Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Nov 2008 11:22:22 GMT
From:      Gleb Kurtsou <gk@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 152407 for review
Message-ID:  <200811031122.mA3BMMDB052525@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=152407

Change 152407 by gk@gk_h1 on 2008/11/03 11:22:09

	print 'multicast' address in table list

Affected files ...

.. //depot/projects/soc2008/gk_l2filter/sbin-ipfw/ipfw2.c#12 edit

Differences ...

==== //depot/projects/soc2008/gk_l2filter/sbin-ipfw/ipfw2.c#12 (text+ko) ====

@@ -6126,8 +6126,12 @@
 		}
 		if (tbl->ent[a].ether_addr.flags & IPFW_EA_CHECK) {
 		    uint8_t *x = (uint8_t *)&tbl->ent[a].ether_addr;
-		    snprintf(tether_buf, sizeof(tether_buf), "ether %02x:%02x:%02x:%02x:%02x:%02x ",
-			 x[0], x[1], x[2], x[3], x[4], x[5]);
+		    if (tbl->ent[a].ether_addr.flags & IPFW_EA_MULTICAST)
+			strlcpy(tether_buf, "ether multicast ", sizeof(tether_buf));
+		    else
+			snprintf(tether_buf, sizeof(tether_buf), 
+			    "ether %02x:%02x:%02x:%02x:%02x:%02x ",
+			    x[0], x[1], x[2], x[3], x[4], x[5]);
 		} else {
 		    tether_buf[0] = 0;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811031122.mA3BMMDB052525>