[systemd-devel] [PATCH] libnetworkd: only allow positive ifindex

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sat Apr 12 13:46:33 PDT 2014


On Sat, Apr 12, 2014 at 09:59:52PM +0200, Tom Gundersen wrote:
> On Sat, Apr 12, 2014 at 7:26 PM, Zbigniew Jędrzejewski-Szmek
> <zbyszek at in.waw.pl> wrote:
> > On Sat, Apr 12, 2014 at 01:19:48PM +0200, Umut Tezduyar Lindskog wrote:
> >> Patch doesn't apply anymore after reference counting changes. I will
> >> re-send it along with ipv4ll tests which is coming up right away.
> > Cool. Could you add a bit of a commit message explaining the change for
> > the poor ignorant sods like me who don't know why indexes start at 0 or 1?
> 
> FWIW: the kernel starts enumerating interfaces at 1 [0]. Varies API's
> accept ifindex=0 to refer to "unknown"/"any"/"all" interfaces. That's
> not useful in these libraries though, as we only want to run these
> clients on a given interface, so restricting to ifindex > 0 makes
> sense.
> 
> Umut, will you resend with a bit more detailed commit message or
> should I fix it up when applying your patch?
Thanks.

Zbyszek

> [0]: <https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/net/core/dev.c#n5524>
> 


More information about the systemd-devel mailing list