diff options
author | ndnops <manangel@cisco.com> | 2019-08-20 16:08:26 +0000 |
---|---|---|
committer | ndnops <manangel@cisco.com> | 2019-08-20 16:10:14 +0000 |
commit | ae1a51414080f89e5dcf2d0c1bf8cd51b38abf63 (patch) | |
tree | e05c01506138c0ba6fa14c5cfdd9c25998e1fe28 /hicn-light/src/hicn/io/udpListener.c | |
parent | 1d896a7f11998346b7ceb0385b1c94ecb5c90c2e (diff) |
[HICN-261] Incorrect handling of IPv6 link-local addresses / connections should not be created unless strictly needed.
Signed-off-by: ndnops <manangel@cisco.com>
Change-Id: I10722996a6bf8868f50a5ac2aff6a937d3f87837
Diffstat (limited to 'hicn-light/src/hicn/io/udpListener.c')
-rw-r--r-- | hicn-light/src/hicn/io/udpListener.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/hicn-light/src/hicn/io/udpListener.c b/hicn-light/src/hicn/io/udpListener.c index 32f633984..02deb49d1 100644 --- a/hicn-light/src/hicn/io/udpListener.c +++ b/hicn-light/src/hicn/io/udpListener.c @@ -418,16 +418,16 @@ static void _handleWldrNotification(UdpListener *udp, unsigned connId, message_Release(&message); } -static Message *_readMessage(ListenerOps * ops, int fd, +static Message *_readMessage(ListenerOps * listener, int fd, AddressPair *pair, uint8_t * packet, bool * processed) { - UdpListener * udp = (UdpListener *)ops->context; + UdpListener * udp = (UdpListener *)listener->context; Message *message = NULL; unsigned connid; bool foundConnection; - const Connection *conn = _lookupConnection(ops, pair); + const Connection *conn = _lookupConnection(listener, pair); if (conn) { connid = connection_GetConnectionId(conn); foundConnection = true; @@ -449,7 +449,7 @@ static Message *_readMessage(ListenerOps * ops, int fd, } else if (messageHandler_IsInterest(packet)) { pktType = MessagePacketType_Interest; if (!foundConnection) { - connid = _createNewConnection(ops, fd, pair); + connid = _createNewConnection(listener, fd, pair); } } else { printf("Got a packet that is not a data nor an interest, drop it!\n"); @@ -471,11 +471,13 @@ static Message *_readMessage(ListenerOps * ops, int fd, *processed = true; _handleProbeMessage(udp, packet); } else { - /* Generic hook handler */ + +#if 0 if (!foundConnection) - connid = _createNewConnection(ops, fd, pair); + connid = _createNewConnection(listener, fd, pair); +#endif - *processed = messageHandler_handleHooks(udp->forwarder, packet, connid); + *processed = messageHandler_handleHooks(udp->forwarder, packet, listener, fd, pair); } return message; |