Revision 05476c4d sysdep/linux/netlink.c

View differences:

sysdep/linux/netlink.c
104 104
  req.nh.nlmsg_type = cmd;
105 105
  req.nh.nlmsg_len = sizeof(req);
106 106
  req.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP;
107
  /* Is it important which PF_* is used for link-level interface scan?
108
     It seems that some information is available only when PF_INET is used. */
109
  req.g.rtgen_family = (cmd == RTM_GETLINK) ? PF_INET : BIRD_PF;
107
  /* Is it important which AF_* is used for link-level interface scan?
108
     It seems that some information is available only when AF_INET is used. */
109
  req.g.rtgen_family = (cmd == RTM_GETLINK) ? AF_INET : BIRD_AF;
110 110
  nl_send(&nl_scan, &req.nh);
111 111
}
112 112

  
......
1069 1069
  sk->type = SK_MAGIC;
1070 1070
  sk->rx_hook = nl_async_hook;
1071 1071
  sk->fd = fd;
1072
  if (sk_open(sk))
1072
  if (sk_open(sk) < 0)
1073 1073
    bug("Netlink: sk_open failed");
1074 1074
}
1075 1075

  

Also available in: Unified diff