2.1.51 net aliases and hardware multicast

a sun (asun@zoology.washington.edu)
Sun, 24 Aug 1997 10:29:47 -0700 (PDT)


here's a patch that makes net aliases pretend to have hardware
multicast if the actual device has it. as i thought much confusion
might occur if the net aliases actually went ahead and changed the
multicast list, i just faked it for them and relied on the actual
device being set correctly. the alternative, of course, is to have
each alias be able to set the multicast list, thereby overriding what
was set before.

one of the cool things this patch does is enable the creation of
appletalk zones w/ only one real device.

-a

--- linux/net/core/net_alias.c.save Sat Aug 23 23:41:46 1997
+++ linux/net/core/net_alias.c Sun Aug 24 10:17:05 1997
@@ -216,6 +216,17 @@
}


+/*
+ * 2 options for multicast:
+ * 1) fake it for aliases.
+ * 2) allow aliases and actual device to set it.
+ * current choice: option 1
+ */
+static void net_alias_setmulticast(struct device *dev)
+{
+}
+
+
/*
* Hard_start_xmit() should not be called.
* ignore ... but shout!.
@@ -269,6 +280,8 @@
dev->type = main_dev->type;
dev->open = net_alias_open;
dev->stop = net_alias_close;
+ if (main_dev->set_multicast_list)
+ dev->set_multicast_list = net_alias_setmulticast;
dev->hard_header_len = main_dev->hard_header_len;
memcpy(dev->broadcast, main_dev->broadcast, MAX_ADDR_LEN);
memcpy(dev->dev_addr, main_dev->dev_addr, MAX_ADDR_LEN);