UML - multicast driver cleanup
PATCH 3/9 UML - multicast driver cleanup
Byte-swapping of the port and IP address passed in to the multicast driver by the user used to happen in different places, which was a bug in itself. The port also was swapped before being printk-ed, which led to a misleading message. This patch moves the port swapping to the same place as the IP address swapping.
It also cleans up the error paths of mcast_open.
arch/um/drivers/mcast_kern.c +1 -3
@@ -73,7 +73,6 @@ int mcast_setup(char *str, char **mac_oustruct mcast_init *init = data;char *port_str =NULL , *ttl_str =NULL , *remain;char *last; -int n; *init = ((struct mcast_init) { .addr = "239.192.168.1",
@@ -89,13 +88,12 @@ int mcast_setup(char *str, char **mac_ou }if (port_str !=NULL ){ - n =simple_strtoul (port_str, &last,10 ); + init->port =simple_strtoul (port_str, &last,10 );if ((*last !='\0' ) || (last == port_str)){printk (KERN_ERR "mcast_setup - Bad port : '%s'\n" , port_str);return (0 ); } - init->port =htons (n); }if (ttl_str !=NULL ){
arch/um/drivers/mcast_user.c +15 -32
102 lines not on this page · raw message
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel