Messages in this thread | | | Date | Thu, 17 Sep 2015 16:20:41 -0700 (PDT) | Subject | Re: [PATCH V1 net-next] net: only check perm protocol when register proto | From | David Miller <> |
| |
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.
| |