Alright, sounds fine.
On Fri, Apr 1, 2011 at 2:22 PM, Ben Pfaff <[email protected]> wrote: > On Fri, Apr 01, 2011 at 02:15:04PM -0700, Ethan Jackson wrote: >> > ?/* A Netlink routing socket that is not subscribed to any multicast >> > groups. */ >> > ?static struct nl_sock *rtnl_sock; >> > @@ -443,6 +444,14 @@ netdev_linux_init(void) >> > ? ? ? ? status = af_inet_sock >= 0 ? 0 : errno; >> > ? ? ? ? if (status) { >> > ? ? ? ? ? ? VLOG_ERR("failed to create inet socket: %s", strerror(status)); >> > + ? ? ? ?} else { >> > + ? ? ? ? ? ?/* Create AF_PACKET socket. */ >> > + ? ? ? ? ? ?af_packet_sock = socket(AF_PACKET, SOCK_RAW, 0); >> > + ? ? ? ? ? ?status = af_packet_sock >= 0 ? 0 : errno; >> > + ? ? ? ? ? ?if (status) { >> > + ? ? ? ? ? ? ? ?VLOG_ERR("failed to create packet socket: %s", >> > + ? ? ? ? ? ? ? ? ? ? ? ? strerror(status)); >> > + ? ? ? ? ? ?} >> > ? ? ? ? } >> >> It's not clear to me why this is an else condition. Is it possible to >> create an af_packet_socket when an af_inet_socket fails? It seems >> like they are orthogonal. > > They are orthogonal but there's no point in creating one without the > other. The overall initialization procedure fails if any part of it > fails. > _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
