--- a/arch/um/drivers/pcap_kern.c 2007-02-04 18:44:54.000000000 +0000 +++ b/arch/um/drivers/pcap_kern.c 2007-04-27 17:45:31.000000000 +0100 @@ -15,6 +15,7 @@ int promisc; int optimize; char *filter; + char *mac; }; void pcap_init(struct net_device *dev, void *data) @@ -56,17 +57,18 @@ int pcap_setup(char *str, char **mac_out, void *data) { struct pcap_init *init = data; - char *remain, *host_if = NULL, *options[2] = { NULL, NULL }; + char *remain, *host_if = NULL, *options[3] = { NULL, NULL, NULL }; int i; *init = ((struct pcap_init) { .host_if = "eth0", .promisc = 1, .optimize = 0, - .filter = NULL }); + .filter = NULL, + .mac = "00:00:00:00:00:00" }); remain = split_if_spec(str, &host_if, &init->filter, - &options[0], &options[1], NULL); + &options[0], &options[1], &options[2], NULL); if(remain != NULL){ printk(KERN_ERR "pcap_setup - Extra garbage on " "specification : '%s'\n", remain); @@ -87,6 +89,11 @@ init->optimize = 1; else if(!strcmp(options[i], "nooptimize")) init->optimize = 0; + else if(strlen(options[i])==17) { + //a mac address is always 17 characters long + strncpy(init->mac, options[i], 17); + *mac_out = init->mac; + } else printk("pcap_setup : bad option - '%s'\n", options[i]); }