diff options
author | Stefan Schmidt <stefan@datenfreihafen.org> | 2018-08-06 09:04:48 +0200 |
---|---|---|
committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2018-08-06 09:04:48 +0200 |
commit | a30461080366214b690a367225a48c95d7a6a189 (patch) | |
tree | 02cd7cfb8cea14cebe1ab2a1638edd8c9b9e0d3f /net/ipv4/af_inet.c | |
parent | 811e299f4645588cc7a1b78d97b6847c155324b9 (diff) | |
parent | 981467033a37d916649647fa3afe1fe99bba1817 (diff) | |
download | linux-a30461080366214b690a367225a48c95d7a6a189.tar.bz2 |
Merge remote-tracking branch 'net-next/master'
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index c716be13d58c..20fda8fb8ffd 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -229,6 +229,7 @@ int inet_listen(struct socket *sock, int backlog) err = inet_csk_listen_start(sk, backlog); if (err) goto out; + tcp_call_bpf(sk, BPF_SOCK_OPS_TCP_LISTEN_CB, 0, NULL); } sk->sk_max_ack_backlog = backlog; err = 0; @@ -485,8 +486,7 @@ int __inet_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len, * is temporarily down) */ err = -EADDRNOTAVAIL; - if (!net->ipv4.sysctl_ip_nonlocal_bind && - !(inet->freebind || inet->transparent) && + if (!inet_can_nonlocal_bind(net, inet) && addr->sin_addr.s_addr != htonl(INADDR_ANY) && chk_addr_ret != RTN_LOCAL && chk_addr_ret != RTN_MULTICAST && @@ -1801,6 +1801,7 @@ static __net_init int inet_init_net(struct net *net) * We set them here, in case sysctl is not compiled. */ net->ipv4.sysctl_ip_default_ttl = IPDEFTTL; + net->ipv4.sysctl_ip_fwd_update_priority = 1; net->ipv4.sysctl_ip_dynaddr = 0; net->ipv4.sysctl_ip_early_demux = 1; net->ipv4.sysctl_udp_early_demux = 1; |