Re: IFF_POINTOPOINT and netmasks

Miquel van Smoorenburg (
Fri, 23 May 1997 19:37:25 +0200

According to Philip Blundell:
> On 21 May 1997, Miquel van Smoorenburg wrote:
> > however as soon as you put the interface UP, the kernel sees that the
> > interface has the IFF_POINTOPOINT flag set and resets the netmask
> > to 0xffffffff. Inspection of the code shows that this works 2 ways-
> > if you set IFF_POINTOPOINT, the netmask gets set to 0xffffffff and if you
> > set the netmask on a running interface to != 0xffffffff the IFF_POINTOPOINT flag
> > gets deleted from the interface,
> >
> > Is this how it's supposed to be?
> >
> > If I define the remote IP address as and netmask,
> > I expect a "magic" route to be added to Or
> > should I clear the IFF_POINTOPOINT flag in that case? That's probably
> > not wise, as then a routing daemon cannot know that
> > this is a pointopoint interface and not a non-broadcast network.
> Mike,
> Why do you want a different netmask on a point-to-point interface? If the
> link is PtP, then by definition there can only be one other machine
> listening on it.
> I don't really understand what you're trying to achieve.

Neither do I I think, that's why I'm posting this :)

I'm working on the isdn4linux pppd. That (old) code sets the netmask on
the interface from a) a command line option or b) derives it from the
interface address (class A,B,C).

I would expect that in that case the "magic" route added by the kernel also
uses this netmask but no, the netmask of the interface gets resetted
to 0xffffffff.

Why is this useful? Well, suppose I dial into my companies network. They
have a class C, Now if I set the netmask to,
a route would be added automatically to the remote system - that's useful,
and that is what you would expect.

However you still want to keep the IFF_POINTOPOINT flag on the interface,
so that "everybody" (routing protocols etc) know that it's just a pointopoint
route and not a non-broadcast network. Or not? [confused here]

This makes sense when you're used to Ciscos and the way routing is
handled; there are 3 types of routes - Connected, Static and routing
protocol (ofcourse there can be multiple routing protocols, but oh well).

I don't think this is a nessecety or something; you can always add routes
manually etc. I just think it looks cleaner and makes more sense. But
it might be that I'm totally wrong; that's why I'm asking... :)


| Miquel van Smoorenburg |  "I need more space" "Well, why not move to Texas" |
|     |  "No, on my account, stupid." "Stupid? Uh-oh.."    |
|     PGP fingerprint: FE 66 52 4F CD 59 A5 36  7F 39 8B 20 F1 D6 74 02       |