DanielG / dhcp-policy-routing

Policy routing or multihoming with DHCP for additional public IP addresses from consumer Cable modems
3 stars 1 forks source link

Add ROUTERADVERT to reasons #3

Closed SpareSimian closed 1 year ago

SpareSimian commented 1 year ago

I discovered empirically with a Raspberry Pi running Buster x64 that ROUTERADVERT is the reason when one issues "ip link set dev eth1 [down|up]" to bounce an interface for testing. So I suggest adding that to the case with "BOUND|REBOOT".

DanielG commented 1 year ago

I don't really get what you're saying. Should ROUTERADVERT just be ignored, or what?

SpareSimian commented 1 year ago

I issue ""ip link set dev eth1 down" then ""ip link set dev eth1 up" to simulate a hotplug event and the script is invoked with reason ROUTERADVERT, not BOUND or REBOOT. So I'm suggesting adding ROUTERADVERT to the interface-up case.

DanielG commented 1 year ago

Hmm, I would expect to see a RENEW or REBOOT in that case regardless. Can you add logging to see what state transitions you get exactly in that case?

Note: It's easiest to log to a file with something like echo whatever >>/tmp/dhcp.log

SpareSimian commented 1 year ago

You're right. The ROUTERADVERT seems to be noise, and I'm indeed getting a BOUND event, just fairly long after I bring the link up. Sorry for the false alarm.