lkml.org 
[lkml]   [2015]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V1 net-next] net: only check perm protocol when register proto
From
From: martinbj2008@gmail.com
Date: Tue, 15 Sep 2015 08:14:05 +0800

> @@ -1043,22 +1043,16 @@ void inet_register_protosw(struct inet_protosw *p)
> goto out_illegal;
>
> /* If we are trying to override a permanent protocol, bail. */
> - answer = NULL;
> last_perm = &inetsw[p->type];
> list_for_each(lh, &inetsw[p->type]) {
> answer = list_entry(lh, struct inet_protosw, list);
> -
> /* Check only the non-wild match. */
> - if (INET_PROTOSW_PERMANENT & answer->flags) {
> - if (protocol == answer->protocol)
> + if ((INET_PROTOSW_PERMANENT & answer->flags) == 0)
> break;
> - last_perm = lh;

Well, if you're going to do this, you need to fix up the indentation
of that "break;" statement.


\
 
 \ /
  Last update: 2015-09-18 01:41    [W:0.033 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site