diff options
| author | Mateusz Guzik <mjg@FreeBSD.org> | 2018-12-11 19:32:16 +0000 |
|---|---|---|
| committer | Mateusz Guzik <mjg@FreeBSD.org> | 2018-12-11 19:32:16 +0000 |
| commit | cc426dd31990b8b50b210efc450e404596548ca1 (patch) | |
| tree | 4c797c5d8886d8d05bb5346b747005b539105825 /sys/netinet6 | |
| parent | 959530cc41aea5f878c2c2cea5b545d295108bab (diff) | |
Notes
Diffstat (limited to 'sys/netinet6')
| -rw-r--r-- | sys/netinet6/in6_pcb.c | 6 | ||||
| -rw-r--r-- | sys/netinet6/ip6_output.c | 9 |
2 files changed, 5 insertions, 10 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 417393ce7a53..fc368ac36992 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -212,12 +212,10 @@ in6_pcbbind(struct inpcb *inp, struct sockaddr *nam, /* GROSS */ if (ntohs(lport) <= V_ipport_reservedhigh && ntohs(lport) >= V_ipport_reservedlow && - priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT, - 0)) + priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT)) return (EACCES); if (!IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr) && - priv_check_cred(inp->inp_cred, - PRIV_NETINET_REUSEPORT, 0) != 0) { + priv_check_cred(inp->inp_cred, PRIV_NETINET_REUSEPORT) != 0) { t = in6_pcblookup_local(pcbinfo, &sin6->sin6_addr, lport, INPLOOKUP_WILDCARD, cred); diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 9c24daf2f7a7..f6539834d39d 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -2781,8 +2781,7 @@ ip6_setpktopt(int optname, u_char *buf, int len, struct ip6_pktopts *opt, case IPV6_2292NEXTHOP: case IPV6_NEXTHOP: if (cred != NULL) { - error = priv_check_cred(cred, - PRIV_NETINET_SETHDROPTS, 0); + error = priv_check_cred(cred, PRIV_NETINET_SETHDROPTS); if (error) return (error); } @@ -2840,8 +2839,7 @@ ip6_setpktopt(int optname, u_char *buf, int len, struct ip6_pktopts *opt, * overhead. */ if (cred != NULL) { - error = priv_check_cred(cred, - PRIV_NETINET_SETHDROPTS, 0); + error = priv_check_cred(cred, PRIV_NETINET_SETHDROPTS); if (error) return (error); } @@ -2877,8 +2875,7 @@ ip6_setpktopt(int optname, u_char *buf, int len, struct ip6_pktopts *opt, int destlen; if (cred != NULL) { /* XXX: see the comment for IPV6_HOPOPTS */ - error = priv_check_cred(cred, - PRIV_NETINET_SETHDROPTS, 0); + error = priv_check_cred(cred, PRIV_NETINET_SETHDROPTS); if (error) return (error); } |
