More clean NL_AUTO_PORT and NL_AUTO_SEQ usage in nl_complete_msg
This commit is contained in:
parent
3bf8712feb
commit
8f2ce4d791
1 changed files with 2 additions and 2 deletions
4
lib/nl.c
4
lib/nl.c
|
@ -274,10 +274,10 @@ void nl_complete_msg(struct nl_sock *sk, struct nl_msg *msg)
|
|||
struct nlmsghdr *nlh;
|
||||
|
||||
nlh = nlmsg_hdr(msg);
|
||||
if (nlh->nlmsg_pid == 0)
|
||||
if (nlh->nlmsg_pid == NL_AUTO_PORT)
|
||||
nlh->nlmsg_pid = sk->s_local.nl_pid;
|
||||
|
||||
if (nlh->nlmsg_seq == 0)
|
||||
if (nlh->nlmsg_seq == NL_AUTO_SEQ)
|
||||
nlh->nlmsg_seq = sk->s_seq_next++;
|
||||
|
||||
if (msg->nm_protocol == -1)
|
||||
|
|
Loading…
Add table
Reference in a new issue