From e4227a44e0fa28b49a6f592230df7ea14d0f26ab Mon Sep 17 00:00:00 2001 From: david Date: Wed, 18 Jun 2008 22:51:17 +0000 Subject: [PATCH] Remove some code which Michael correctly surmised isn't used. Replace it with an assertion. --- tcpip.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tcpip.cc b/tcpip.cc index 52b43e878..b793909db 100644 --- a/tcpip.cc +++ b/tcpip.cc @@ -3090,13 +3090,10 @@ bool route_dst(const struct sockaddr_storage *const dst, struct route_nfo *rnfo) fatal("Sorry -- %s currently only supports IPv4", __func__); if (o.spoofsource) { - memcpy(&rnfo->srcaddr, &spoofss, sizeof(rnfo->srcaddr)); o.SourceSockAddr(&spoofss, &spoofsslen); - if (!*o.device) { - /* Look up the device corresponding to src IP, if any ... */ - //WARNING: THIS IS NEVER USED(i think) - iface = getInterfaceByIP(&spoofss); - } + /* The device corresponding to this spoofed address should already have been + set elsewhere. */ + assert(o.device[0] != '\0'); } //dont use this method for user specified devices