I have a better solution for this problem implemented on 2.1. I added a new
IFF_DYNAMIC interface flag that is inherited by all IP addresses set on the
interface, and when they finally disappear (not exist on any other interface)
fib sends out a NETDEV_REBOOT notifier on the inetaddr_chain. TCP simply
hooks into that chain and when it receives NETDEV_REBOOT calls tcp_reset
on all sockets with that source address set.
Advantage over your patch:
- Cleaner
- Doesn't send out bogus packets
- Could be used in future by other protocols and even user space (over
rtnetlink) too.
I didn't submit it because of the code freeze, but before your patch would
be added I think my patch would fit better and is more maintainable.
Only caveat is that it needs another patch to remove IFF_NODYNARP, otherwise
there are no interface flags bits left (iffr_flags is a short).
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/