Project

General

Profile

Bug #9357

rc.newwanipv6 called regardless of REASON

Added by Flole Systems over 1 year ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Interfaces
Target version:
-
Start date:
02/27/2019
Due date:
% Done:

0%

Estimated time:
Affected Version:
Affected Architecture:

Description

The dhcp6c_wan_script.sh does not honor the REASON-Variable set by the dhcp6c process. Even though it is RENEW and the interface lease was renewed way ahead of the IP expiry, the newwanipv6 script is called causing filter reload and so on. I would expect that REASON environment-variable is evaluated and then checked if we have a RENEW (lease extended) or really a REBIND (lease expired and needed to get a new one, we lost the IP on the interface for some time in this case so calling newwanipv6 is fine in this case).

For me every filter-reload causes some UDP-Packetloss, so I am trying to get "useless" reloads down to a minimum.

History

#1 Updated by Flole Systems over 1 year ago

We probably need something like a "copy" of /usr/local/sbin/pfSense-dhclient-script here, just for IPv6

#2 Updated by Flole Systems about 1 year ago

A dirty patch I am using for now is adding these lines in /var/etc/dhcp6c_wan_script.sh

if [ "$REASON" == "RENEW" ]; then
exit
fi

(Just posting this here so I don't forget what I did when I have to re-do it again cause it got overwritten)

#3 Updated by Karl Klempner 10 months ago

Version 2.4.4-p3 has the following dhcp6c_wan_script.sh which should already ignore the RENEW reason:

#!/bin/sh
# This shell script launches /etc/rc.newwanipv6 with a interface argument.
dmips=${new_domain_name_servers}
dmnames=${new_domain_name}
case $REASON in
REQUEST)
/usr/local/sbin/fcgicli -f /etc/rc.newwanipv6 -d "interface=pppoe0&dmnames=${dmnames}&dmips=${dmips}" 
;;
REBIND)
;;
RELEASE)
/usr/local/sbin/fcgicli -f /etc/rc.newwanipv6 -d "interface=pppoe0&dmnames=${dmnames}&dmips=${dmips}" 
;;
RENEW|INFO)
esac

Are you able to test this? If you disable and re-enable IPv6 on your WAN interface, /var/etc/dhcp6c_wan_script.sh should be replaced with the default file of your pfSense version. (Therefore, keep a copy of your modified file before you disable IPv6.)

#4 Updated by Flole Systems 10 months ago

Hi Karl,

thanks for pointing this out! In that case this is fixed in 2.4.4-p3 and it was simply not marked fixed here. I haven't updated to p3 yet as I thought there is no benefit in doing that for me, seems like there is now.

We can mark this fixed then.

#5 Updated by Jim Pingle 10 months ago

  • Status changed from New to Resolved

#6 Updated by Flole Systems 10 months ago

Actually the script posted above is only used if "don't wait for RA" is set, otherwise the "old" script is still used. Please re-open this (and fix this, I think the same script could be used in both cases, not sure why this is not the case).

#7 Updated by Jim Pingle 10 months ago

  • Status changed from Resolved to New

#8 Updated by Jim Pingle 10 months ago

  • Category set to Interfaces

#9 Updated by Viktor Gurov 4 months ago

Flole Systems wrote:

Actually the script posted above is only used if "don't wait for RA" is set, otherwise the "old" script is still used. Please re-open this (and fix this, I think the same script could be used in both cases, not sure why this is not the case).

2.4.4-p3 files, both files have RENEW

/var/etc/dhcp6c_wan_script.sh:

#!/bin/sh
# This shell script launches /etc/rc.newwanipv6 with a interface argument.
dmips=${new_domain_name_servers}
dmnames=${new_domain_name}
case $REASON in
REQUEST)
/usr/local/sbin/fcgicli -f /etc/rc.newwanipv6 -d "interface=mvneta0&dmnames=${dmnames}&dmips=${dmips}" 
;;
REBIND)
;;
RELEASE)
/usr/local/sbin/fcgicli -f /etc/rc.newwanipv6 -d "interface=mvneta0&dmnames=${dmnames}&dmips=${dmips}" 
;;
RENEW|INFO)
esac

/var/etc/dhcp6c_wan_dhcp6withoutra_script.sh:

#!/bin/sh
# This shell script launches rtsold.
dmips=${new_domain_name_servers}
dmnames=${new_domain_name}
dreason=${REASON}
echo $dmips > /tmp/mvneta0_domain_name_servers
echo $dmnames > /tmp/mvneta0_new_domain_name
echo $dreason > /tmp/mvneta0_reason
case $REASON in
REQUEST)
/bin/sleep 2
/usr/sbin/rtsold -1 -p /var/run/rtsold_mvneta0.pid -O /var/etc/rtsold_mvneta0_script.sh mvneta0
;;
REBIND)
;;
RELEASE)
/usr/local/sbin/fcgicli -f /etc/rc.newwanipv6 -d "interface=mvneta0&dmnames=${dmnames}&dmips=${dmips}" 
;;
RENEW|INFO)
esac

#10 Updated by Jim Pingle 4 months ago

  • Status changed from New to Closed

Also available in: Atom PDF