summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-netlink
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2016-06-08 23:10:16 +0200
committerTom Gundersen <teg@jklm.no>2016-06-08 23:10:16 +0200
commitd9c11f2b01463e33a0b453e013786b5b79182dbe (patch)
treeabb611242bb5a77acefffe053b80840dfd7cd32d /src/libsystemd/sd-netlink
parente80f080bffeab01390a086c802f7e47bd11fc369 (diff)
parent889b550f2dc27b7696781d3d9d91e8de28fd8fee (diff)
Merge pull request #3431 from poettering/network-fixes
put limits on addresses and routers per link and per network
Diffstat (limited to 'src/libsystemd/sd-netlink')
-rw-r--r--src/libsystemd/sd-netlink/sd-netlink.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsystemd/sd-netlink/sd-netlink.c b/src/libsystemd/sd-netlink/sd-netlink.c
index 91701405a5..43114eb825 100644
--- a/src/libsystemd/sd-netlink/sd-netlink.c
+++ b/src/libsystemd/sd-netlink/sd-netlink.c
@@ -144,7 +144,10 @@ int sd_netlink_open(sd_netlink **ret) {
return 0;
}
-int sd_netlink_inc_rcvbuf(const sd_netlink *const rtnl, const int size) {
+int sd_netlink_inc_rcvbuf(sd_netlink *rtnl, size_t size) {
+ assert_return(rtnl, -EINVAL);
+ assert_return(!rtnl_pid_changed(rtnl), -ECHILD);
+
return fd_inc_rcvbuf(rtnl->fd, size);
}