diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/netpoll.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 0c1482c6ff98..462cdc97fad8 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -943,6 +943,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt) { char *cur=opt, *delim; int ipv6; + bool ipversion_set = false; if (*cur != '@') { if ((delim = strchr(cur, '@')) == NULL) @@ -955,6 +956,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt) cur++; if (*cur != '/') { + ipversion_set = true; if ((delim = strchr(cur, '/')) == NULL) goto parse_failed; *delim = 0; @@ -997,7 +999,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt) ipv6 = netpoll_parse_ip_addr(cur, &np->remote_ip); if (ipv6 < 0) goto parse_failed; - else if (np->ipv6 != (bool)ipv6) + else if (ipversion_set && np->ipv6 != (bool)ipv6) goto parse_failed; else np->ipv6 = (bool)ipv6; |