Should kernel use ipv4_is_loopback or ifconfig settings?

71 Views Asked by At

This is a kernel source code question. If it isn't appropriate here, please let me know.

There's a macro called ipv4_is_loopback that would seem to be an appropriate way to determine if an address is a loopback or external. It has about 20 references in the kernel code I have seen. However, ifconfig (or ip) commands allow setting the address and mask for "lo". In testing, it seems that the setting via ifconfig seems to govern a lot of the behaviors - like transmitting a UDP packet. On the other hand, some of the kernel source code suggests that the macro may govern things like arp'ing. This seems strange.

Why are there two ways of determining if an address is a loopback?

0

There are 0 best solutions below