[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150917.162041.2147817140272126896.davem@davemloft.net>
Date: Thu, 17 Sep 2015 16:20:41 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: martinbj2008@...il.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
baker.kernel@...il.com
Subject: Re: [PATCH V1 net-next] net: only check perm protocol when
register proto
From: martinbj2008@...il.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists