PERFORCE change 152407 for review

Gleb Kurtsou gk at FreeBSD.org
Mon Nov 3 03:22:23 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=152407

Change 152407 by gk at 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;
 		}


More information about the p4-projects mailing list