Skip to content

Commit

Permalink
rc: backport newwan changes from master
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Apr 25, 2017
1 parent 7b2c48a commit f31964a
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 119 deletions.
110 changes: 48 additions & 62 deletions src/etc/rc.newwanip
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,40 @@
<?php

/*
Copyright (C) 2006 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
* Copyright (C) 2006 Scott Ullrich <sullrich@gmail.com>
* Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

require_once("config.inc");
require_once('auth.inc');
require_once("auth.inc");
require_once("filter.inc");
require_once("services.inc");
require_once("rrd.inc");
require_once("util.inc");
require_once("system.inc");
require_once("interfaces.inc");
require_once("services.inc");

// Do not process while booting
if (file_exists('/var/run/booting')) {
Expand All @@ -48,59 +48,45 @@ if (isset($argv[1])) {
} else {
$argument = null;
}
log_error("rc.newwanip: Informational is starting {$argument}.");

log_error("Informational is starting '{$argument}'");

if (empty($argument)) {
$interface = "wan";
$interface_real = get_real_interface();
$interface_real = get_real_interface($interface);
$curwanip = get_interface_ip($interface);
} else {
$interface = convert_real_interface_to_friendly_interface_name($argument);
$interface_real = $argument;
$curwanip = find_interface_ip($interface_real);
if (empty($curwanip)) {
$curwanip = get_interface_ip($interface);
}
}

$interface_descr = convert_friendly_interface_to_friendly_descr($interface);

/* If the interface is configured and not enabled, bail. We do not need to change settings for disabled interfaces. #3313 */
if (is_array($config['interfaces'][$interface]) && !isset($config['interfaces'][$interface]['enable'])) {
log_error("Interface is disabled, nothing to do.");
return;
} elseif (empty($interface)) {
log_error("Interface is empty, nothing to do.");
if (!isset($config['interfaces'][$interface]['enable'])) {
log_error("Interface is disabled or empty, nothing to do.");
return;
}

if (empty($argument)) {
$curwanip = get_interface_ip();
} else {
$curwanip = find_interface_ip($interface_real);
if(empty($curwanip)) {
$curwanip = get_interface_ip($interface);
}
}
$interface_descr = convert_friendly_interface_to_friendly_descr($interface);

log_error("rc.newwanip: on (IP address: {$curwanip}) (interface: {$interface_descr}[{$interface}]) (real interface: {$interface_real}).");
log_error("On (IP address: {$curwanip}) (interface: {$interface_descr}[{$interface}]) (real interface: {$interface_real}).");

/*
* NOTE: Take care of openvpn, no-ip or similar interfaces if you generate the event to reconfigure an interface.
* i.e. OpenVPN might be in tap mode and not have an ip.
* NOTE: Take care of openvpn and similar if you generate the event to reconfigure an interface.
* i.e. OpenVPN might be in tap mode and not have an ip.
*/
if ($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) {
if (substr($interface_real, 0, 4) != "ovpn") {
if (!empty($config['interfaces'][$interface]['ipaddr'])) {
log_error("rc.newwanip: Failed to update {$interface} IP, restarting...");
configd_run("interface reconfigure {$interface}");
return;
}
if ((empty($curwanip) || !is_ipaddr($curwanip)) && substr($interface_real, 0, 4) != "ovpn") {
if (!empty($config['interfaces'][$interface]['ipaddr'])) {
log_error("Failed to update {$interface} IP, restarting...");
configd_run("interface reconfigure {$interface}");
return;
}
}

if (file_exists("/var/db/{$interface}_cacheip")) {
$oldip = file_get_contents("/var/db/{$interface}_cacheip");
} else {
$oldip = "0.0.0.0";
}

system_resolvconf_generate();
$oldip = @file_get_contents("/var/db/{$interface}_cacheip");

/* write the current interface IP to file */
/* used in src/sbin/dhclient-script.ext */
Expand Down Expand Up @@ -130,7 +116,7 @@ if (!empty($bridgetmp)) {
interface_bridge_add_member($bridgetmp, $interface_real);
}

/* make new hosts file */
system_resolvconf_generate();
system_hosts_generate();

/* check tunneled IPv6 interface tracking */
Expand Down
109 changes: 52 additions & 57 deletions src/etc/rc.newwanipv6
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/*
* Copyright (C) 2006 Scott Ullrich <sullrich@gmail.com>
* Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
* Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -29,18 +29,23 @@
*/

require_once("config.inc");
require_once("interfaces.inc");
require_once("auth.inc");
require_once("filter.inc");
require_once("services.inc");
require_once("rrd.inc");
require_once("util.inc");
require_once("system.inc");
require_once("interfaces.inc");

// Do not process while booting
if (file_exists('/var/run/booting')) {
return;
}

/* Interface IP address has changed */
$argument = trim($argv[1], " \n\t");

log_error("rc.newwanipv6: Informational is starting {$argument}.");
log_error("Informational is starting '{$argument}'");

if (empty($argument)) {
$interface = "wan";
Expand All @@ -52,25 +57,23 @@ if (empty($argument)) {
$curwanipv6 = get_interface_ipv6($interface, true);
}

$interface_descr = convert_friendly_interface_to_friendly_descr($interface);

if (empty($interface)) {
filter_configure();
/* If the interface is configured and not enabled, bail. We do not need to change settings for disabled interfaces. #3313 */
if (!isset($config['interfaces'][$interface]['enable'])) {
log_error("Interface is disabled or empty, nothing to do.");
return;
}

//Do not process while booting
if (file_exists("/var/run/booting") && $config['interfaces'][$interface]['ipaddrv6'] != "dhcp6") {
return;
}
$interface_descr = convert_friendly_interface_to_friendly_descr($interface);

log_error("On (IP address: {$curwanipv6}) (interface: {$interface_descr}[{$interface}]) (real interface: {$interface_real}).");

/*
* NOTE: Take care of openvpn and similar if you generate the event to reconfigure an interface.
* i.e. OpenVPN might be in tap mode and not have an ip.
*/
if ((empty($curwanipv6) || !is_ipaddrv6($curwanipv6)) && substr($interface_real, 0, 4) != "ovpn") {
log_error("rc.newwanipv6: Failed to detect IPv6 for {$interface_descr}[{$interface}]");
return;
log_error("Failed to detect IPv6 for {$interface_descr}[{$interface}]");
return;
}

$new_domain_name_servers = getenv("new_domain_name_servers");
Expand All @@ -83,25 +86,20 @@ if (!empty($new_domain_name_servers)) {
}

if (count($valid_ns) > 0) {
file_put_contents("/var/etc/nameserver_v6{$interface}", implode("\n", $valid_ns));
@file_put_contents("/var/etc/nameserver_v6{$interface}", implode("\n", $valid_ns));
}
}
$new_domain_name = getenv("new_domain_name");
if (!empty($new_domain_name)) {
file_put_contents("/var/etc/searchdomain_v6{$interface}", $new_domain_name);
@file_put_contents("/var/etc/searchdomain_v6{$interface}", $new_domain_name);
}

/* write current WAN IPv6 to file */
if (is_ipaddrv6($curwanipv6)) {
@file_put_contents("/var/db/{$interface}_ipv6", $curwanipv6);
}

log_error("rc.newwanipv6: on (IP address: {$curwanipv6}) (interface: {$interface}) (real interface: {$interface_real}).");

$oldipv6 = "";
if (file_exists("/var/db/{$interface}_cacheipv6")) {
$oldipv6 = file_get_contents("/var/db/{$interface}_cacheipv6");
}
$oldipv6 = @file_get_contents("/var/db/{$interface}_cacheipv6");

$grouptmp = link_interface_to_group($interface);
if (!empty($grouptmp)) {
Expand All @@ -110,46 +108,43 @@ if (!empty($grouptmp)) {

link_interface_to_track6($interface, "update");
system_resolvconf_generate();
system_routing_configure($interface);
setup_gateways_monitor();

/* signal filter reload */
filter_configure();

if (is_ipaddrv6($oldipv6)) {
if ($curwanipv6 == $oldipv6) {
// Still need to sync VPNs on PPPoE and such, as even with the same IP the VPN software is unhappy with the IP disappearing.
if (in_array($config['interfaces'][$interface]['ipaddrv6'], array('pppoe', 'pptp', 'ppp'))) {
/* reconfigure IPsec tunnels */
if (ipsec_configured_on_interface($interface)) {
ipsec_configure();
}

/* start OpenVPN server & clients */
if (substr($interface_real, 0, 4) != "ovpn") {
openvpn_resync_all($interface);
}
system_hosts_generate();

/*
* We need to force sync VPNs on such even when the IP is the same for dynamic interfaces.
* Even with the same IP the VPN software is unhappy with the IP disappearing, and we
* could be failing back in which case we need to switch IPs back anyhow.
*/
if (!is_ipaddr($oldipv6) || $curwanipv6 != $oldipv6 || !is_ipaddrv6($config['interfaces'][$interface]['ipaddrv6'])) {
system_routing_configure($interface);
setup_gateways_monitor();

if (is_ipaddrv6($oldipv6)) {
if (does_interface_exist($interface_real)) {
mwexec("/sbin/ifconfig {$interface_real} inet6 {$oldipv6} delete");
}
return;
} elseif (does_interface_exist($interface_real)) {
mwexec("/sbin/ifconfig {$interface_real} inet6 {$oldipv6} delete");
}

file_put_contents("/var/db/{$interface}_cacheipv6", $curwanipv6);
}
if (is_ipaddrv6($curwanipv6)) {
@file_put_contents("/var/db/{$interface}_cacheipv6", $curwanipv6);
}

/* reconfigure IPsec tunnels */
if (ipsec_configured_on_interface($interface)) {
ipsec_configure();
}
/* reconfigure IPsec tunnels */
if (ipsec_configured_on_interface($interface)) {
ipsec_configure();
}

/* start OpenVPN server & clients */
if (substr($interface_real, 0, 4) != 'ovpn') {
openvpn_resync_all($interface);
}
/* start OpenVPN server & clients */
if (substr($interface_real, 0, 4) != "ovpn") {
openvpn_resync_all($interface);
}

/* reload graphing functions */
rrd_configure();

/* reload graphing functions */
rrd_configure();
/* reload plugins */
plugins_configure('interface');
}

/* reload plugins */
plugins_configure('interface');
/* reload filter, don't try to sync to carp slave */
filter_configure_sync();

13 comments on commit f31964a

@Woi
Copy link

@Woi Woi commented on f31964a May 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After testing this patch for a few days, it seems like things got worse:
After a reboot IPv6 works for some time, buit I still get every 15 mins annoying log messages as before. But then log messages stop to appear and so does the IPv6 connectivity.
While a ping www.heise.de from a client works immediately after a OPNsense reboot, after some time it stops working till the next OPNsense reboot:

$ ping www.heise.de
PING www.heise.de(www.heise.de (2a02:2e0:3fe:1001:7777:772e:2:85)) 56 data bytes
^C
--- www.heise.de ping statistics ---
25 packets transmitted, 0 received, 100% packet loss, time 24594ms

Log messages:

May 1 22:59:06 	kernel: cannot forward src XXXIPv6, dst XXXIPv6, nxt 58, rcvif vr0, outif pppoe0
May 1 18:44:28 	opnsense: /usr/local/etc/rc.newwanipv6: Could not find IPv6 gateway for interface(wan).
May 1 18:44:21 	opnsense: /usr/local/etc/rc.newwanipv6: Dynamic DNS: (Success) IP Address Updated Successfully!
May 1 18:44:21 	opnsense: /usr/local/etc/rc.newwanipv6: Dynamic DNS: updating cache file /var/cache/dyndns_wan_example.com_0.cache: XXXIPv4
May 1 18:44:14 	opnsense: /usr/local/etc/rc.newwanipv6: ROUTING: setting IPv4 default route to XXXIPv4
May 1 18:44:10 	opnsense: /usr/local/etc/rc.newwanipv6: On (IP address: XXXIPv6) (interface: WAN[wan]) (real interface: pppoe0).
May 1 18:44:10 	opnsense: /usr/local/etc/rc.newwanipv6: Informational is starting 'pppoe0'
May 1 18:29:26 	opnsense: /usr/local/etc/rc.newwanipv6: Could not find IPv6 gateway for interface(wan).
May 1 18:29:18 	opnsense: /usr/local/etc/rc.newwanipv6: Dynamic DNS: (Success) IP Address Updated Successfully!
May 1 18:29:18 	opnsense: /usr/local/etc/rc.newwanipv6: Dynamic DNS: updating cache file /var/cache/dyndns_wan_example.com_0.cache: XXXIPv4
May 1 18:29:12 	opnsense: /usr/local/etc/rc.newwanipv6: The command '/sbin/ifconfig pppoe0 inet6 XXXIPv6 delete' returned exit code '1', the output was 'ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address'
May 1 18:29:11 	opnsense: /usr/local/etc/rc.newwanipv6: ROUTING: setting IPv4 default route to XXXIPv4
May 1 18:29:09 	opnsense: /usr/local/etc/rc.newwanipv6: On (IP address: XXXIPv6) (interface: WAN[wan]) (real interface: pppoe0).
May 1 18:29:08 	opnsense: /usr/local/etc/rc.newwanipv6: Informational is starting 'pppoe0'
May 1 18:15:44 	opnsense: /index.php: User logged out for user 'root' from: XXXIPv4

@fichtner
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for testing, there was a nasty bug in this... b792c9f

I don't think we can get of the reload, it looks like this is directly tied to ppp-linkup, but the reload can be made less annoying:

9b4c350efb

Still work to do but it looks like light at the end of the tunnel :)

@Woi
Copy link

@Woi Woi commented on f31964a May 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to test. Especially since opnsense-patch is such a neat little tool :) Do you have already a new patch you want me to test?

@fichtner
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Woi ok, let's start with the simple PPPoE patch on top of a clean 17.1.6:

# opnsense-patch 9b4c350

This should make the reload every 15 minutes more graceful although I suspect there will be issues with it we need to address elsewhere in the midterm (ppp-linkup)

@Woi
Copy link

@Woi Woi commented on f31964a May 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I applied 9b4c350 on a "clean" (no additional patches/all previous patches removed) 17.1.6. Looks good so far. I'll paste you the relevant bits of the log files in the next comment. But before some technical details to make clear you have the right picture:
I'm using a VDSL Vectoring connection from Deutsche Telekom (DTAG).
IPv4 connection is made using PPPoE. IPv6 uses DHCPv6 through this IPv4 PPPoE link. It seems to be one of the newer DTAG configurations, where DTAG doesn't provide an IPv6 address any more: Request only a IPv6 prefix needs to be enabled, otherwise I ended up in a reconnection loop (not tested with 17.1.4 and newer).
Also DTAG doesn't force a daily reconnect any more as with the old POTS and ISDN connections. Consequently OPNsense doesn't log anything to the PPPoE log during normal operations.

@Woi
Copy link

@Woi Woi commented on f31964a May 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diag_logs_ppp after reboot:

May 8 10:19:40 	ppp: [wan_link0] rec'd unexpected protocol IP
May 8 10:19:34 	ppp: [wan] x.x.x.x -> y.y.y.y
May 8 10:19:34 	ppp: [wan] IPCP: LayerUp
May 8 10:19:34 	ppp: [wan] IPCP: state change Ack-Sent --> Opened
May 8 10:19:34 	ppp: [wan] SECDNS 217.237.149.205
May 8 10:19:34 	ppp: [wan] PRIDNS 217.237.151.51
May 8 10:19:34 	ppp: [wan] IPADDR x.x.x.x
May 8 10:19:34 	ppp: [wan] IPCP: rec'd Configure Ack #3 (Ack-Sent)
May 8 10:19:34 	ppp: [wan] IFACE: Rename interface ng0 to pppoe0
May 8 10:19:34 	ppp: [wan] IFACE: Up event
May 8 10:19:20 	ppp: [wan] XXX -> XXX
May 8 10:19:20 	ppp: [wan] IPV6CP: LayerUp
May 8 10:19:20 	ppp: [wan] IPV6CP: state change Ack-Sent --> Opened
May 8 10:19:20 	ppp: [wan] IPV6CP: rec'd Configure Ack #1 (Ack-Sent)
May 8 10:19:20 	ppp: [wan] SECDNS 217.237.149.205
May 8 10:19:20 	ppp: [wan] PRIDNS 217.237.151.51
May 8 10:19:20 	ppp: [wan] IPADDR x.x.x.x
May 8 10:19:20 	ppp: [wan] IPCP: SendConfigReq #3
May 8 10:19:20 	ppp: [wan] SECDNS 217.237.149.205
May 8 10:19:20 	ppp: [wan] PRIDNS 217.237.151.51
May 8 10:19:20 	ppp: [wan] x.x.x.x is OK
May 8 10:19:20 	ppp: [wan] IPADDR x.x.x.x
May 8 10:19:20 	ppp: [wan] IPCP: rec'd Configure Nak #2 (Ack-Sent)
May 8 10:19:20 	ppp: [wan] IPV6CP: state change Req-Sent --> Ack-Sent
May 8 10:19:20 	ppp: [wan] IPV6CP: SendConfigAck #100
May 8 10:19:20 	ppp: [wan] IPV6CP: rec'd Configure Request #100 (Req-Sent)
May 8 10:19:20 	ppp: [wan] SECDNS 0.0.0.0
May 8 10:19:20 	ppp: [wan] PRIDNS 0.0.0.0
May 8 10:19:20 	ppp: [wan] IPADDR 0.0.0.0
May 8 10:19:20 	ppp: [wan] IPCP: SendConfigReq #2
May 8 10:19:20 	ppp: [wan] COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
May 8 10:19:20 	ppp: [wan] IPCP: rec'd Configure Reject #1 (Ack-Sent)
May 8 10:19:20 	ppp: [wan] IPCP: state change Req-Sent --> Ack-Sent
May 8 10:19:20 	ppp: [wan] IPADDR y.y.y.y
May 8 10:19:20 	ppp: [wan] IPCP: SendConfigAck #100
May 8 10:19:20 	ppp: [wan] y.y.y.y is OK
May 8 10:19:20 	ppp: [wan] IPADDR y.y.y.y
May 8 10:19:20 	ppp: [wan] IPCP: rec'd Configure Request #100 (Req-Sent)
May 8 10:19:20 	ppp: [wan] IPV6CP: SendConfigReq #1
May 8 10:19:20 	ppp: [wan] IPV6CP: state change Starting --> Req-Sent
May 8 10:19:20 	ppp: [wan] IPV6CP: Up event
May 8 10:19:20 	ppp: [wan] SECDNS 0.0.0.0
May 8 10:19:20 	ppp: [wan] PRIDNS 0.0.0.0
May 8 10:19:20 	ppp: [wan] COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
May 8 10:19:20 	ppp: [wan] IPADDR 0.0.0.0
May 8 10:19:20 	ppp: [wan] IPCP: SendConfigReq #1
May 8 10:19:20 	ppp: [wan] IPCP: state change Starting --> Req-Sent
May 8 10:19:20 	ppp: [wan] IPCP: Up event
May 8 10:19:20 	ppp: [wan] IPV6CP: LayerStart
May 8 10:19:20 	ppp: [wan] IPV6CP: state change Initial --> Starting
May 8 10:19:20 	ppp: [wan] IPV6CP: Open event
May 8 10:19:20 	ppp: [wan] IPCP: LayerStart
May 8 10:19:20 	ppp: [wan] IPCP: state change Initial --> Starting
May 8 10:19:20 	ppp: [wan] IPCP: Open event
May 8 10:19:20 	ppp: [wan] Bundle: Status update: up 1 link, total bandwidth 64000 bps
May 8 10:19:20 	ppp: [wan_link0] Link: Join bundle "wan"
May 8 10:19:20 	ppp: [wan_link0] Link: Matched action 'bundle "wan" ""'
May 8 10:19:20 	ppp: [wan_link0] LCP: authorization successful
May 8 10:19:20 	ppp: [wan_link0] PAP: rec'd ACK #1 len: 5
May 8 10:19:20 	ppp: [wan_link0] LCP: LayerUp
May 8 10:19:20 	ppp: [wan_link0] PAP: sending REQUEST #1 len: 55
May 8 10:19:20 	ppp: [wan_link0] PAP: using authname "LONGNUMBER#0001@t-online.de"
May 8 10:19:20 	ppp: [wan_link0] LCP: auth: peer wants PAP, I want nothing
May 8 10:19:20 	ppp: [wan_link0] LCP: state change Ack-Sent --> Opened
May 8 10:19:20 	ppp: [wan_link0] MAGICNUM 0xd845XXXX
May 8 10:19:20 	ppp: [wan_link0] MRU 1492
May 8 10:19:20 	ppp: [wan_link0] PROTOCOMP
May 8 10:19:20 	ppp: [wan_link0] LCP: rec'd Configure Ack #1 (Ack-Sent)
May 8 10:19:20 	ppp: [wan_link0] LCP: state change Req-Sent --> Ack-Sent
May 8 10:19:20 	ppp: [wan_link0] MAGICNUM 0x7ae6XXXX
May 8 10:19:20 	ppp: [wan_link0] AUTHPROTO PAP
May 8 10:19:20 	ppp: [wan_link0] MRU 1492
May 8 10:19:20 	ppp: [wan_link0] LCP: SendConfigAck #220
May 8 10:19:20 	ppp: [wan_link0] MAGICNUM 0x7ae6XXXX
May 8 10:19:20 	ppp: [wan_link0] AUTHPROTO PAP
May 8 10:19:20 	ppp: [wan_link0] MRU 1492
May 8 10:19:20 	ppp: [wan_link0] LCP: rec'd Configure Request #220 (Req-Sent)
May 8 10:19:20 	ppp: [wan_link0] MAGICNUM 0xd84XXXX
May 8 10:19:20 	ppp: [wan_link0] MRU 1492
May 8 10:19:20 	ppp: [wan_link0] PROTOCOMP
May 8 10:19:20 	ppp: [wan_link0] LCP: SendConfigReq #1
May 8 10:19:20 	ppp: [wan_link0] LCP: state change Starting --> Req-Sent
May 8 10:19:20 	ppp: [wan_link0] LCP: Up event
May 8 10:19:20 	ppp: [wan_link0] Link: UP event
May 8 10:19:20 	ppp: [wan_link0] PPPoE: connection successful
May 8 10:19:20 	ppp: PPPoE: rec'd ACNAME "BERJ11"
May 8 10:19:14 	ppp: [wan_link0] PPPoE: Connecting to ''
May 8 10:19:13 	ppp: [wan_link0] LCP: LayerStart
May 8 10:19:13 	ppp: [wan_link0] LCP: state change Initial --> Starting
May 8 10:19:13 	ppp: [wan_link0] LCP: Open event
May 8 10:19:13 	ppp: [wan_link0] Link: OPEN event
May 8 10:19:13 	ppp: [wan] Bundle: Interface ng0 created
May 8 10:19:13 	ppp: web: web is not running
May 8 10:19:13 	ppp: process 21265 started, version 5.8 (root@sensey32 03:20 21-Feb-2017)
May 8 10:19:13 	ppp:
May 8 10:19:13 	ppp: Multi-link PPP daemon for FreeBSD

@Woi
Copy link

@Woi Woi commented on f31964a May 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diag_logs (without the reboot, since it's mixed with other messages):

May 8 10:49:26 	opnsense: /usr/local/etc/rc.newwanipv6: ROUTING: setting IPv6 default route to LINKLOCAL%pppoe0
May 8 10:49:26 	opnsense: /usr/local/etc/rc.newwanipv6: ROUTING: setting IPv4 default route to y.y.y.y
May 8 10:49:24 	opnsense: /usr/local/etc/rc.newwanipv6: rc.newwanipv6: on (IP address: LINKLOCAL) (interface: wan) (real interface: pppoe0).
May 8 10:49:24 	opnsense: /usr/local/etc/rc.newwanipv6: rc.newwanipv6: Informational is starting pppoe0.
May 8 10:34:26 	opnsense: /usr/local/etc/rc.newwanipv6: ROUTING: setting IPv6 default route to LINKLOCAL%pppoe0
May 8 10:34:26 	opnsense: /usr/local/etc/rc.newwanipv6: ROUTING: setting IPv4 default route to y.y.y.y
May 8 10:34:25 	UNKNOWN[50040]: removing /var/run/radvd.pid
May 8 10:34:25 	UNKNOWN[50040]: sending stop adverts
May 8 10:34:25 	UNKNOWN[50040]: Exiting, sigterm or sigint received.
May 8 10:34:24 	opnsense: /usr/local/etc/rc.newwanipv6: rc.newwanipv6: on (IP address: LINKLOCAL) (interface: wan) (real interface: pppoe0).
May 8 10:34:24 	sshlockout[83202]: sshlockout/webConfigurator v3.0 starting up
May 8 10:34:24 	opnsense: /usr/local/etc/rc.newwanipv6: rc.newwanipv6: Informational is starting pppoe0.

@fichtner
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you using prefix delegation on WAN only? Asking because of LINKLOCAL

@Woi
Copy link

@Woi Woi commented on f31964a May 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. I just replaced the fe80:-Addresses with LINKLOCAL. But on the other hand: there were no IPv6 addresses other then link local ones in the log files. See https://forum.opnsense.org/index.php?topic=5037.0 for details of my configuration.

@fichtner
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, it must take linklocal here so that's good. Looks fine, let's go with this for a day or two. :)

@Woi
Copy link

@Woi Woi commented on f31964a May 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:-)

@Woi
Copy link

@Woi Woi commented on f31964a May 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this patch improved the situation: I couldn't observer any lags during gaming and it's only 4 instead of 10 log lines every 15 min. It also worked without any downsides during the last 24hrs.

May 9 10:49:28 	opnsense: /usr/local/etc/rc.newwanipv6: ROUTING: setting IPv6 default route to fe80::105:105:XXXX:XXXX%pppoe0
May 9 10:49:28 	opnsense: /usr/local/etc/rc.newwanipv6: ROUTING: setting IPv4 default route to Y.Y.Y.Y
May 9 10:49:26 	opnsense: /usr/local/etc/rc.newwanipv6: rc.newwanipv6: on (IP address: fe80::20d:b9ff:XXXX:XXXX) (interface: wan) (real interface: pppoe0).
May 9 10:49:26 	opnsense: /usr/local/etc/rc.newwanipv6: rc.newwanipv6: Informational is starting pppoe0.

@fichtner
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Woi yay, thanks a ton! I have a new patch based on your feedback improving on the original patch tomorrow

Please sign in to comment.