Project

General

Profile

Actions

Bug #7145

closed

rc.newwanipv6 running in all cases, even for a renew

Added by Jim Pingle about 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
DHCP (IPv6)
Target version:
Start date:
01/19/2017
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:
All

Description

dhcp6c calls its script for every action, a new binding or a renew and so on. The problem is that rc.newwanipv6 is run even when nothing changed. For example, the address didn't get removed or changed, it just renews the lease and keeps on going. In this case, the interface wasn't altered at all and the actions it takes can be quite harsh/disruptive.

We may not be able to do anything about this yet since dhcp6c does not pass back the type of action it performed. It always sets REASON=NBI in the environment so the script can't tell what exactly happened. rc.newwanipv6 does check the old address vs the new, but it still does things like reset the routing and resets the monitor IP address routing.

It also appears to be triggered twice for each event. I added a "source" parameter to the dhcp6c_wan_script.sh:

Jan 19 10:22:04 clara php-fpm[298]: /rc.newwanipv6: rc.newwanipv6: Info: starting on vmx0, called by dhcp6c.
Jan 19 10:22:04 clara php-fpm[298]: /rc.newwanipv6: rc.newwanipv6: on (IP address: 2001:db8::ffff:f236) (interface: wan) (real interface: vmx0).
Jan 19 10:22:07 clara php-fpm[298]: /rc.newwanipv6: ROUTING: setting default route to 198.51.100.1
Jan 19 10:22:07 clara php-fpm[298]: /rc.newwanipv6: ROUTING: setting IPv6 default route to fe80::290:bff:fe37:a324%vmx0
Jan 19 10:22:07 clara php-fpm[298]: /rc.newwanipv6: Removing static route for monitor fe80::290:bff:fe37:a324 and adding a new route through fe80::290:bff:fe37:a324%vmx0
Jan 19 10:22:07 clara check_reload_status: Reloading filter
Jan 19 10:22:07 clara php-fpm[299]: /rc.newwanipv6: rc.newwanipv6: Info: starting on vmx0, called by dhcp6c.
Jan 19 10:22:07 clara php-fpm[299]: /rc.newwanipv6: rc.newwanipv6: on (IP address: 2001:db8::ffff:f236) (interface: wan) (real interface: vmx0).
Jan 19 10:22:10 clara php-fpm[299]: /rc.newwanipv6: ROUTING: setting default route to 198.51.100.1
Jan 19 10:22:10 clara php-fpm[299]: /rc.newwanipv6: ROUTING: setting IPv6 default route to fe80::290:bff:fe37:a324%vmx0
Jan 19 10:22:10 clara php-fpm[299]: /rc.newwanipv6: Removing static route for monitor fe80::290:bff:fe37:a324 and adding a new route through fe80::290:bff:fe37:a324%vmx0
Jan 19 10:22:10 clara check_reload_status: Reloading filter

Feel free to kick this forward to 2.4.1 if there is no immediately viable solution


Files

dhcp6c (156 KB) dhcp6c Martin Wasley, 01/24/2017 02:33 PM
patch-dhcp6c__script.c (894 Bytes) patch-dhcp6c__script.c Martin Wasley, 01/25/2017 01:04 AM
patch-dhcp6c.c (1.91 KB) patch-dhcp6c.c Martin Wasley, 01/25/2017 01:46 AM
patch-common.c (333 Bytes) patch-common.c Changed log message to show IA and/or PD address Martin Wasley, 01/30/2017 06:48 AM
patch-config.h (403 Bytes) patch-config.h Added new DHCP6S_EXIT state Martin Wasley, 01/30/2017 06:48 AM
patch-dhcp6c.c (3.32 KB) patch-dhcp6c.c Added new signal handling SIGUSER1, log changes and exit script call Martin Wasley, 01/30/2017 06:48 AM
patch-dhcp6c__script.c (16.6 KB) patch-dhcp6c__script.c Added Reason params Martin Wasley, 01/30/2017 06:48 AM
patch-common.c (333 Bytes) patch-common.c Martin Wasley, 01/30/2017 11:13 AM
patch-config.h (403 Bytes) patch-config.h Martin Wasley, 01/30/2017 11:13 AM
patch-dhcp6c.c (3.75 KB) patch-dhcp6c.c Martin Wasley, 01/30/2017 11:13 AM
patch-dhcp6c__script.c (16.6 KB) patch-dhcp6c__script.c Martin Wasley, 01/30/2017 11:13 AM
Actions

Also available in: Atom PDF