[ipv6] Handle netdev parameter being non-null in ipv6_tx
authorMatthew Iselin <matthew@theiselins.net>
Sat, 4 Jun 2011 02:10:38 +0000 (12:10 +1000)
committerMarty Connor <mdc@etherboot.org>
Thu, 21 Jul 2011 00:59:18 +0000 (20:59 -0400)
Signed-off-by: Matthew Iselin <matthew@theiselins.net>
Signed-off-by: Marty Connor <mdc@etherboot.org>
src/net/ipv6.c

index 97665b8..78e1eb2 100644 (file)
@@ -212,6 +212,11 @@ static int ipv6_tx ( struct io_buffer *iobuf,
        /* Determine the next hop address and interface. */
        next_hop = dest->sin6_addr;
        list_for_each_entry ( miniroute, &miniroutes, list ) {
        /* Determine the next hop address and interface. */
        next_hop = dest->sin6_addr;
        list_for_each_entry ( miniroute, &miniroutes, list ) {
+               /* Check for specific netdev */
+               if ( netdev && ( miniroute->netdev != netdev ) ) {
+                       continue;
+               }
+               
                /* Link-local route? */
                linklocal = (miniroute->address.in6_u.u6_addr16[0] & htons(0xFE80)) == htons(0xFE80);
 
                /* Link-local route? */
                linklocal = (miniroute->address.in6_u.u6_addr16[0] & htons(0xFE80)) == htons(0xFE80);