summaryrefslogtreecommitdiffstats
path: root/net/sched/act_api.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-09-14 16:41:03 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-09-14 16:41:03 -0700
commit4878809f711981a602cc562eb47994fc81ea0155 (patch)
tree17e84e056331e90514fe1a5069d1fba9cdaab274 /net/sched/act_api.c
parent19299b1a722198830e39264a0f2edadd3fde74c2 (diff)
downloadblackbird-op-linux-4878809f711981a602cc562eb47994fc81ea0155.tar.gz
blackbird-op-linux-4878809f711981a602cc562eb47994fc81ea0155.zip
[NET]: Fix two issues wrt. SO_BINDTODEVICE.
1) Comments suggest that setting optlen to zero will unbind the socket from whatever device it might be attached to. This hasn't been the case since at least 2.2.x because the first thing this function does is return -EINVAL if 'optlen' is less than sizeof(int). This check also means that passing in a two byte string doesn't work so well. It's almost as if this code was testing with "eth?" patterned strings and nothing else :-) Fix this by breaking the logic of this facility out into a seperate function which validates optlen more appropriately. The optlen==0 and small string cases now work properly. 2) We should reset the cached route of the socket after we have made the device binding changes, not before. Reported by Ben Greear. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_api.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud