Fix: sa_family is of type unsigned short
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 31 Aug 2016 04:21:14 +0000 (00:21 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 31 Aug 2016 15:33:14 +0000 (11:33 -0400)
sa_family is an unsigned short in sockaddr definitions. For instance,
the kernel's unix_getname() function sets addrlen to sizeof(short) as it
only returns the socket's family.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h

index b262228f9a641835a287489ebd724ac27e696ee8..5e910049583e01f1dc217ea831749f0a121fbabc 100644 (file)
@@ -44,7 +44,7 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(connect,
                sc_in(ctf_integer(int, fd, fd))
                sc_in(ctf_integer_hex(struct sockaddr *, uservaddr, uservaddr))
                sc_in(ctf_integer_hex(int, addrlen, addrlen))
-               sc_in(ctf_integer(int, family, tp_locvar->sa_family))
+               sc_in(ctf_integer(unsigned short, family, tp_locvar->sa_family))
                sc_in(ctf_integer_network(uint16_t, dport, tp_locvar->dport))
                sc_in(ctf_sequence_network(uint8_t, v4addr, &tp_locvar->v4addr, unsigned int, tp_locvar->v4addr_len))
                sc_in(ctf_sequence_network(uint16_t, v6addr, &tp_locvar->v6addr, unsigned int, tp_locvar->v6addr_len))
@@ -106,7 +106,7 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(accept,
                sc_in(ctf_integer(int, fd, fd))
                sc_in(ctf_integer_hex(struct sockaddr *, upeer_sockaddr, upeer_sockaddr))
                sc_inout(ctf_integer(int, upeer_addrlen, tp_locvar->uaddr_len))
-               sc_out(ctf_integer(int, family, tp_locvar->sa_family))
+               sc_out(ctf_integer(unsigned short, family, tp_locvar->sa_family))
                sc_out(ctf_integer_network(uint16_t, sport, tp_locvar->sport))
                sc_out(ctf_sequence_network(uint8_t, v4addr, &tp_locvar->v4addr, unsigned int, tp_locvar->v4addr_len))
                sc_out(ctf_sequence_network(uint16_t, v6addr, &tp_locvar->v6addr, unsigned int, tp_locvar->v6addr_len))
@@ -130,7 +130,7 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(accept4,
                sc_in(ctf_integer_hex(struct sockaddr *, upeer_sockaddr, upeer_sockaddr))
                sc_inout(ctf_integer(int, upeer_addrlen, tp_locvar->uaddr_len))
                sc_in(ctf_integer_hex(int, flags, flags))
-               sc_out(ctf_integer(int, family, tp_locvar->sa_family))
+               sc_out(ctf_integer(unsigned short, family, tp_locvar->sa_family))
                sc_out(ctf_integer_network(uint16_t, sport, tp_locvar->sport))
                sc_out(ctf_sequence_network(uint8_t, v4addr, &tp_locvar->v4addr, unsigned int, tp_locvar->v4addr_len))
                sc_out(ctf_sequence_network(uint16_t, v6addr, &tp_locvar->v6addr, unsigned int, tp_locvar->v6addr_len))
This page took 0.02687 seconds and 4 git commands to generate.