From 866b40b2020ab026f2297fa82d1ea632968141fc Mon Sep 17 00:00:00 2001 From: Tommaso Pecorella Date: Wed, 12 Jul 2017 19:54:20 +0200 Subject: [PATCH] internet: (fixes #2762) BindToNetDevice behaviour is not coherent with Linux --- CHANGES.html | 5 ++ RELEASE_NOTES | 1 + src/aodv/model/aodv-routing-protocol.cc | 12 +-- src/dsdv/model/dsdv-routing-protocol.cc | 4 +- src/internet-apps/model/dhcp-client.cc | 2 +- src/internet-apps/model/dhcp-server.cc | 2 +- src/internet/model/ipv4-end-point-demux.cc | 42 ++++++---- src/internet/model/ipv4-end-point-demux.h | 17 ++-- src/internet/model/ipv6-end-point-demux.cc | 67 +++++++-------- src/internet/model/ipv6-end-point-demux.h | 14 +++- src/internet/model/rip.cc | 4 +- src/internet/model/ripng.cc | 4 +- src/internet/model/tcp-l4-protocol.cc | 44 +++++----- src/internet/model/tcp-l4-protocol.h | 20 +++-- src/internet/model/tcp-socket-base.cc | 34 +++----- src/internet/model/udp-l4-protocol.cc | 48 ++++++----- src/internet/model/udp-l4-protocol.h | 21 +++-- src/internet/model/udp-socket-impl.cc | 97 +++++++++++++++------- src/internet/test/ipv4-rip-test.cc | 2 +- src/internet/test/ipv6-ripng-test.cc | 2 +- src/network/model/socket.h | 7 +- src/olsr/model/olsr-routing-protocol.cc | 2 +- src/wave/model/bsm-application.cc | 2 +- 23 files changed, 259 insertions(+), 194 deletions(-) diff --git a/CHANGES.html b/CHANGES.html index 461275248..e7de8cffb 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -130,6 +130,11 @@ is now exported by WifiNetDevice. Previously, a socket bound to an unicast address received also subnet-directed broadcast packets. This is not anymore possible. +
  • You can now Bind as many socket as you want to an address/port, provided that they are bound to different NetDevices. + Moreover, BindToNetDevice does not anymore call Bind. In other terms, Bind and BindToNetDevice can be called + in any order. + However, it is suggested to use BindToNetDevice before Bind in order to avoid conflicts. +
  • Changes to build system: