Displaying 1 result from an estimated 1 matches for "ip_portrangelow".
Did you mean:
ip_portrange_low
2004 Nov 21
1
mac_portacl and automatic port allocation
...*sin;
+ struct inpcb *inp = sotoinpcb(so);
int family, type;
u_int16_t port;
@@ -467,6 +469,11 @@
type = so->so_type;
sin = (struct sockaddr_in *) sockaddr;
port = ntohs(sin->sin_port);
+ /* If port == 0 and user hasn't asked for IP_PORTRANGELOW return
+ success */
+ printf("mac_portacl: port %d, inp_flags: 0x%X\n", port,
inp->inp_flags);
+ if (port == 0 && (inp->inp_flags & INP_LOWPORT) == 0)
+ return (0);
return (rules_check(cred, family, type, port));
}
------------...