Steven Stallion wrote:
>>> It's pretty easy to duplicate (initial run on snv_89):
>>>
>>> # ifconfig dnet0 plumb
>>> # ifconfig dnet0 10.0.0.1 255.255.255.0 up #missing netmask
>>> # ifconfig dnet0
>>> dnet0: flags=200000851<UP,POINTOPOINT,RUNNING,MULTICAST,CoS> mtu 1500
>>> inet 10.0.0.1 --> 255.255.255.0 netmask ff000000
>>> ether 0:c0:ca:13:a4:9e
>> There is some historic code in ip; it was originally added to be able to
>> test IP's pointopoint code when we had nothing but Ethernet drivers.
>>
>> I think we should remove that code.
>>
>> Erik
>
> I would be more than happy to track this down and provide a patch with the
> offending code removed.
The offending code I was thinking of is this code in ip_if.c
if ((ipif->ipif_flags & IPIF_POINTOPOINT) == 0) {
/*
* Allow this as a means of creating logical
* pt-pt interfaces on top of e.g. an Ethernet.
* XXX Undocumented HACK for testing.
* pt-pt interfaces are created with NUD disabled.
*/
ipif->ipif_flags |= IPIF_POINTOPOINT;
ipif->ipif_flags &= ~IPIF_BROADCAST;
if (ipif->ipif_isv6)
ill->ill_flags |= ILLF_NONUD;
}
I think that would return EINVAL or EADDRNOTAVAIL on other OSes.
Erik
_______________________________________________
networking-discuss mailing list
[email protected]