[patch] checking loopback ip address for ipv4?

boyang boyang at novell.com
Fri Sep 5 04:13:11 GMT 2008


Jeremy Allison wrote:
> On Thu, Sep 04, 2008 at 08:46:21PM +0200, Stefan (metze) Metzmacher wrote:
>   
>> boyang schrieb:
>>     
>>> Hi, everybody:
>>>       First I am quite sorry that I didn't realize the format to send
>>> email. I am quite sorry for the inconvenience.
>>>      
>>>       According to RFC3330 and RFC1700, 127.0.0.0/8 is used for loopback
>>> address. Therefore, it is not enough just to check 127.0.0.1, any
>>> address resides in 127.0.0.0/8 is loopback address. The issue appears in
>>> net ads dns register, somebody has configured 127.0.0.2 to loopback
>>> interface, and it is registered with dns, which is not right.
>>>       It is true that 127.0.0.1 is the popular way that is used by
>>> loopback interface, but there is always exceptions that somebody uses
>>> other address in 127.0.0.0/8 as loopback address.
>>>       patch for v3-[023]-test and v3-devel arrive in attachment, please
>>> review it.
>>>       
>> Hi,
>>
>> are you sure this doesn't break 'make test'?
>>     
>
> Actually I'm pretty sure it does :-). I recently tried to
> mess with is_loopback() and ran into that.
>   
Looks like it doesn't broke v3-0-test, because changes only affect net
ads dns register,  because get_my_ip_address() is only used in
net_dns.c. :-) But it broke v3-[23]-test, because is_loopback_addr() is
invoked in several places except in get_my_ip_address(),
I think it is reasonable to add a function is_loopback_network(), which
will be used by get_my_ip_address() to prevent 127.x.x.x being
registered with dns server. If it is ok, I'll work on it.
>   
>> We may need some more magic...
>>     
>
> Yep.
>
> Jeremy.
>
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: boyang.vcf
Type: text/x-vcard
Size: 209 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080905/7cf6522e/boyang.vcf


More information about the samba-technical mailing list