commit | 83ba4645152d1177c161750e1064e3a8e7cee19b | [log] [tgz] |
---|---|---|
author | Vincent Bernat <vincent@bernat.im> | Tue Jul 31 21:18:11 2018 +0200 |
committer | David S. Miller <davem@davemloft.net> | Wed Aug 01 09:50:04 2018 -0700 |
tree | 7209c851dda98efb2aa1e7a42ff738d3fe560c38 | |
parent | d39db3b4d60c9bc4282b36753a7255d2a5ef0384 [diff] |
net: add helpers checking if socket can be bound to nonlocal address The construction "net->ipv4.sysctl_ip_nonlocal_bind || inet->freebind || inet->transparent" is present three times and its IPv6 counterpart is also present three times. We introduce two small helpers to characterize these tests uniformly. Signed-off-by: Vincent Bernat <vincent@bernat.im> Signed-off-by: David S. Miller <davem@davemloft.net>