On 10/24/2015 06:22 AM, Mike Frysinger wrote:
On 23 Oct 2015 22:07, Florian Weimer wrote:
quoted
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/netlink_assert_response.c
@@ -0,0 +1,100 @@
+/* Copyright (C) 2015 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
guess we like to have the first line be a short desc of the file
Added.
quoted
+static int
+get_address_family (int fd)
+{
...
+ return sa.ss_family;
ss_family is of type sa_family_t, not int ... not a big deal, but the
two do differ in sign ...
Thanks. I added static asserts to make sure that the actual type does
not cause problems with the use of -1 and an int return value.
I do not want to use SO_DOMAIN here because I expect this to eventually
move into generic code because we probably should do similar checking on
other internally-used sockets (where reporting impossible errors to the
caller would be grossly misleading).
I'm still waiting for comments from the kernel people. :)
Florian