libnl 3 with kernel < 2.6.38

Thierry Reding thierry.reding at avionic-design.de
Wed Mar 23 08:03:29 EDT 2011


* Thomas Graf wrote:
> On Wed, Mar 23, 2011 at 10:50:06AM +0100, Thierry Reding wrote:
> > > This is not expected behaviour.
> > > 
> > > Can you give me some additional details on what kind of link change
> > > you do?
> > 
> > The following is the function that exhibits the described behaviour:
> 
> Can you run your code with the environment variable NLCB=debug
> 
> 	$ NLCB=debug ./program
> 
> and post the output of that?
> 
> I suspect the problem is the inclusion of the IFLA_AF_SPEC
> attribute.

Attached.

Cheers,
Thierry
-------------- next part --------------
-- Debug: Sent Message:
--------------------------   BEGIN NETLINK MESSAGE ---------------------------
  [HEADER] 16 octets
    .nlmsg_len = 20
    .nlmsg_type = 18 <route/link::get>
    .nlmsg_flags = 773 <REQUEST,ACK,ROOT,MATCH>
    .nlmsg_seq = 1009839801
    .nlmsg_pid = 1980
  [PAYLOAD] 16 octets
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00       ................
  [LEFTOVER] -12 octets
---------------------------  END NETLINK MESSAGE   ---------------------------
-- Debug: Received Message:
--------------------------   BEGIN NETLINK MESSAGE ---------------------------
  [HEADER] 16 octets
    .nlmsg_len = 424
    .nlmsg_type = 16 <route/link::new>
    .nlmsg_flags = 2 <MULTI>
    .nlmsg_seq = 1009839801
    .nlmsg_pid = 1980
  [PAYLOAD] 16 octets
    00 00 04 03 01 00 00 00 49 00 01 00 00 00 00 00       ........I.......
  [ATTR 03] 3 octets
    6c 6f 00                                              lo.
  [PADDING] 1 octets
    00                                                    .
  [ATTR 13] 4 octets
    00 00 00 00                                           ....
  [ATTR 16] 1 octets
    00                                                    .
  [PADDING] 3 octets
    00 00 00                                              ...
  [ATTR 17] 1 octets
    00                                                    .
  [PADDING] 3 octets
    00 00 00                                              ...
  [ATTR 04] 4 octets
    34 40 00 00                                           4 at ..
  [ATTR 06] 8 octets
    6e 6f 71 75 65 75 65 00                               noqueue.
  [ATTR 14] 28 octets
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00                         ..........
  [ATTR 01] 6 octets
    00 00 00 00 00 00                                     ......
  [PADDING] 2 octets
    00 00                                                 ..
  [ATTR 02] 6 octets
    00 00 00 00 00 00                                     ......
  [PADDING] 2 octets
    00 00                                                 ..
  [ATTR 07] 92 octets
    04 00 00 00 04 00 00 00 24 01 00 00 24 01 00 00 00 00 ........$...$.....
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00                                                 ..
  [ATTR 23] 184 octets
    04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 24 01 ................$.
    00 00 00 00 00 00 24 01 00 00 00 00 00 00 00 00 00 00 ......$...........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00                                           ....
---------------------------  END NETLINK MESSAGE   ---------------------------
-- Debug: Received Message:
--------------------------   BEGIN NETLINK MESSAGE ---------------------------
  [HEADER] 16 octets
    .nlmsg_len = 420
    .nlmsg_type = 16 <route/link::new>
    .nlmsg_flags = 2 <MULTI>
    .nlmsg_seq = 1009839801
    .nlmsg_pid = 1980
  [PAYLOAD] 16 octets
    00 00 08 03 02 00 00 00 80 00 00 00 00 00 00 00       ................
  [ATTR 03] 5 octets
    73 69 74 30 00                                        sit0.
  [PADDING] 3 octets
    00 00 00                                              ...
  [ATTR 13] 4 octets
    00 00 00 00                                           ....
  [ATTR 16] 1 octets
    02                                                    .
  [PADDING] 3 octets
    00 00 00                                              ...
  [ATTR 17] 1 octets
    00                                                    .
  [PADDING] 3 octets
    00 00 00                                              ...
  [ATTR 04] 4 octets
    c8 05 00 00                                           ....
  [ATTR 06] 5 octets
    6e 6f 6f 70 00                                        noop.
  [PADDING] 3 octets
    00 00 00                                              ...
  [ATTR 14] 28 octets
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00                         ..........
  [ATTR 01] 4 octets
    00 00 00 00                                           ....
  [ATTR 02] 4 octets
    00 00 00 00                                           ....
  [ATTR 07] 92 octets
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00                                                 ..
  [ATTR 23] 184 octets
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00                                           ....
---------------------------  END NETLINK MESSAGE   ---------------------------
-- Debug: Received Message:
--------------------------   BEGIN NETLINK MESSAGE ---------------------------
  [HEADER] 16 octets
    .nlmsg_len = 444
    .nlmsg_type = 16 <route/link::new>
    .nlmsg_flags = 2 <MULTI>
    .nlmsg_seq = 1009839801
    .nlmsg_pid = 1980
  [PAYLOAD] 16 octets
    00 00 01 03 03 00 00 00 80 00 00 00 00 00 00 00       ................
  [ATTR 03] 8 octets
    69 70 36 74 6e 6c 30 00                               ip6tnl0.
  [ATTR 13] 4 octets
    00 00 00 00                                           ....
  [ATTR 16] 1 octets
    02                                                    .
  [PADDING] 3 octets
    00 00 00                                              ...
  [ATTR 17] 1 octets
    00                                                    .
  [PADDING] 3 octets
    00 00 00                                              ...
  [ATTR 04] 4 octets
    ac 05 00 00                                           ....
  [ATTR 06] 5 octets
    6e 6f 6f 70 00                                        noop.
  [PADDING] 3 octets
    00 00 00                                              ...
  [ATTR 14] 28 octets
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00                         ..........
  [ATTR 01] 16 octets
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00       ................
  [ATTR 02] 16 octets
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00       ................
  [ATTR 07] 92 octets
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00                                                 ..
  [ATTR 23] 184 octets
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00                                           ....
---------------------------  END NETLINK MESSAGE   ---------------------------
-- Debug: Received Message:
--------------------------   BEGIN NETLINK MESSAGE ---------------------------
  [HEADER] 16 octets
    .nlmsg_len = 436
    .nlmsg_type = 16 <route/link::new>
    .nlmsg_flags = 2 <MULTI>
    .nlmsg_seq = 1009839801
    .nlmsg_pid = 1980
  [PAYLOAD] 16 octets
    00 00 01 00 04 00 00 00 02 10 00 00 00 00 00 00       ................
  [ATTR 03] 5 octets
    65 74 68 30 00                                        eth0.
  [PADDING] 3 octets
    00 00 00                                              ...
  [ATTR 13] 4 octets
    e8 03 00 00                                           ....
  [ATTR 16] 1 octets
    02                                                    .
  [PADDING] 3 octets
    00 00 00                                              ...
  [ATTR 17] 1 octets
    00                                                    .
  [PADDING] 3 octets
    00 00 00                                              ...
  [ATTR 04] 4 octets
    dc 05 00 00                                           ....
  [ATTR 06] 5 octets
    6e 6f 6f 70 00                                        noop.
  [PADDING] 3 octets
    00 00 00                                              ...
  [ATTR 14] 28 octets
    00 00 bc fe 00 00 00 00 00 00 be fe 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 17 00 00 00                         ..........
  [ATTR 01] 6 octets
    00 d0 c9 b8 70 71                                     ....pq
  [PADDING] 2 octets
    00 00                                                 ..
  [ATTR 02] 6 octets
    ff ff ff ff ff ff                                     ......
  [PADDING] 2 octets
    00 00                                                 ..
  [ATTR 07] 92 octets
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00                                                 ..
  [ATTR 23] 184 octets
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..................
    00 00 00 00                                           ....
  [ATTR 21] 4 octets
    00 00 00 00                                           ....
---------------------------  END NETLINK MESSAGE   ---------------------------
-- Debug: Received Message:
--------------------------   BEGIN NETLINK MESSAGE ---------------------------
  [HEADER] 16 octets
    .nlmsg_len = 20
    .nlmsg_type = 3 <DONE>
    .nlmsg_flags = 2 <MULTI>
    .nlmsg_seq = 1009839801
    .nlmsg_pid = 1980
  [PAYLOAD] 4 octets
    00 00 00 00                                           ....
---------------------------  END NETLINK MESSAGE   ---------------------------
-- Debug: End of multipart message block: type=DONE length=20 flags=<MULTI> sequence-nr=1009839801 pid=1980
-- Debug: Sent Message:
--------------------------   BEGIN NETLINK MESSAGE ---------------------------
  [HEADER] 16 octets
    .nlmsg_len = 36
    .nlmsg_type = 19 <route/link::set>
    .nlmsg_flags = 5 <REQUEST,ACK>
    .nlmsg_seq = 1009839802
    .nlmsg_pid = 1980
  [PAYLOAD] 16 octets
    00 00 00 00 02 00 00 00 81 00 00 00 00 00 00 00       ................
  [ATTR 26] 0 octets
    ---------------------------  END NETLINK MESSAGE   ---------------------------
-- Debug: Received Message:
--------------------------   BEGIN NETLINK MESSAGE ---------------------------
  [HEADER] 16 octets
    .nlmsg_len = 56
    .nlmsg_type = 2 <ERROR>
    .nlmsg_flags = 0 <>
    .nlmsg_seq = 1009839802
    .nlmsg_pid = 1980
  [ERRORMSG] 20 octets
    .error = -22 "Invalid argument"
  [ORIGINAL MESSAGE] 16 octets
    .nlmsg_len = 16
    .nlmsg_type = 19 <0x13>
    .nlmsg_flags = 5 <REQUEST,ACK>
    .nlmsg_seq = 1009839802
    .nlmsg_pid = 1980
---------------------------  END NETLINK MESSAGE   ---------------------------
-- Error received: Invalid argument
-- Original message: type=0x13 length=36 flags=<REQUEST,ACK> sequence-nr=1009839802 pid=1980
-- Debug: Sent Message:
--------------------------   BEGIN NETLINK MESSAGE ---------------------------
  [HEADER] 16 octets
    .nlmsg_len = 36
    .nlmsg_type = 19 <route/link::set>
    .nlmsg_flags = 5 <REQUEST,ACK>
    .nlmsg_seq = 1009839803
    .nlmsg_pid = 1980
  [PAYLOAD] 16 octets
    00 00 00 00 03 00 00 00 81 00 00 00 00 00 00 00       ................
  [ATTR 26] 0 octets
    ---------------------------  END NETLINK MESSAGE   ---------------------------
-- Debug: Received Message:
--------------------------   BEGIN NETLINK MESSAGE ---------------------------
  [HEADER] 16 octets
    .nlmsg_len = 56
    .nlmsg_type = 2 <ERROR>
    .nlmsg_flags = 0 <>
    .nlmsg_seq = 1009839803
    .nlmsg_pid = 1980
  [ERRORMSG] 20 octets
    .error = -22 "Invalid argument"
  [ORIGINAL MESSAGE] 16 octets
    .nlmsg_len = 16
    .nlmsg_type = 19 <0x13>
    .nlmsg_flags = 5 <REQUEST,ACK>
    .nlmsg_seq = 1009839803
    .nlmsg_pid = 1980
---------------------------  END NETLINK MESSAGE   ---------------------------
-- Error received: Invalid argument
-- Original message: type=0x13 length=36 flags=<REQUEST,ACK> sequence-nr=1009839803 pid=1980
-- Debug: Sent Message:
--------------------------   BEGIN NETLINK MESSAGE ---------------------------
  [HEADER] 16 octets
    .nlmsg_len = 36
    .nlmsg_type = 19 <route/link::set>
    .nlmsg_flags = 5 <REQUEST,ACK>
    .nlmsg_seq = 1009839804
    .nlmsg_pid = 1980
  [PAYLOAD] 16 octets
    00 00 00 00 04 00 00 00 03 10 00 00 00 00 00 00       ................
  [ATTR 26] 0 octets
    ---------------------------  END NETLINK MESSAGE   ---------------------------
-- Debug: Received Message:
--------------------------   BEGIN NETLINK MESSAGE ---------------------------
  [HEADER] 16 octets
    .nlmsg_len = 56
    .nlmsg_type = 2 <ERROR>
    .nlmsg_flags = 0 <>
    .nlmsg_seq = 1009839804
    .nlmsg_pid = 1980
  [ERRORMSG] 20 octets
    .error = -22 "Invalid argument"
  [ORIGINAL MESSAGE] 16 octets
    .nlmsg_len = 16
    .nlmsg_type = 19 <0x13>
    .nlmsg_flags = 5 <REQUEST,ACK>
    .nlmsg_seq = 1009839804
    .nlmsg_pid = 1980
---------------------------  END NETLINK MESSAGE   ---------------------------
-- Error received: Invalid argument
-- Original message: type=0x13 length=36 flags=<REQUEST,ACK> sequence-nr=1009839804 pid=1980
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20110323/4dc31ca7/attachment-0001.sig>


More information about the libnl mailing list