]> git.baikalelectronics.ru Git - kernel.git/commit
net: only check perm protocol when register proto
authorJunwei Zhang <martinbj2008@gmail.com>
Fri, 18 Sep 2015 04:00:05 +0000 (00:00 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Sep 2015 04:02:59 +0000 (21:02 -0700)
commit777456d33539bc34405f33a20fc11e3fdd6d9d17
treec93d338e62e226a6bb75b27383521d133ae24ae0
parent33bc4eef94a68e95345ad9a1aef2188e2ff6f7bb
net: only check perm protocol when register proto

The permanent protocol nodes are at the head of the list,
So only need check all these nodes.

No matter the new node is permanent or not,
insert the new node after the last permanent protocol node,

If the new node conflicts with existing permanent node,
return error.

Signed-off-by: Martin Zhang <martinbj2008@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/af_inet.c