chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-rtnl: recv_message - log when dropping message
[elogind.git]
/
src
/
libsystemd
/
sd-rtnl
/
rtnl-util.c
diff --git
a/src/libsystemd/sd-rtnl/rtnl-util.c
b/src/libsystemd/sd-rtnl/rtnl-util.c
index 1ec1fa8d27905c7b5a77b7765983624a3a877da4..194a267b04b88af126235ee2f63a17a9035871f7 100644
(file)
--- a/
src/libsystemd/sd-rtnl/rtnl-util.c
+++ b/
src/libsystemd/sd-rtnl/rtnl-util.c
@@
-122,6
+122,17
@@
int rtnl_message_new_synthetic_error(int error, uint32_t serial, sd_rtnl_message
return 0;
}
return 0;
}
+bool rtnl_message_type_is_neigh(uint16_t type) {
+ switch (type) {
+ case RTM_NEWNEIGH:
+ case RTM_GETNEIGH:
+ case RTM_DELNEIGH:
+ return true;
+ default:
+ return false;
+ }
+}
+
bool rtnl_message_type_is_route(uint16_t type) {
switch (type) {
case RTM_NEWROUTE:
bool rtnl_message_type_is_route(uint16_t type) {
switch (type) {
case RTM_NEWROUTE:
@@
-157,11
+168,9
@@
bool rtnl_message_type_is_addr(uint16_t type) {
}
int rtnl_log_parse_error(int r) {
}
int rtnl_log_parse_error(int r) {
- log_error("Failed to parse netlink message: %s", strerror(-r));
- return r;
+ return log_error_errno(r, "Failed to parse netlink message: %m");
}
int rtnl_log_create_error(int r) {
}
int rtnl_log_create_error(int r) {
- log_error("Failed to create netlink message: %s", strerror(-r));
- return r;
+ return log_error_errno(r, "Failed to create netlink message: %m");
}
}