chiark
/
gitweb
/
~ianmdlvl
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
netlink: Break out sender_name
[secnet.git]
/
netlink.c
diff --git
a/netlink.c
b/netlink.c
index 41968e4dc6ffc1c56f44cdb21d6c8b89623b1aea..e53c339f420f01b5e18790ba2fe02ea746f35278 100644
(file)
--- a/
netlink.c
+++ b/
netlink.c
@@
-237,6
+237,11
@@
struct icmphdr {
static const union icmpinfofield icmp_noinfo;
static const union icmpinfofield icmp_noinfo;
+static const char *sender_name(struct netlink_client *sender /* or NULL */)
+{
+ return sender?sender->name:"(local)";
+}
+
static void netlink_packet_deliver(struct netlink *st,
struct netlink_client *client,
struct buffer_if *buf);
static void netlink_packet_deliver(struct netlink *st,
struct netlink_client *client,
struct buffer_if *buf);
@@
-615,7
+620,7
@@
static void netlink_packet_deliver(struct netlink *st,
{
if (buf->size < (int)sizeof(struct iphdr)) {
Message(M_ERR,"%s: trying to deliver a too-short packet"
{
if (buf->size < (int)sizeof(struct iphdr)) {
Message(M_ERR,"%s: trying to deliver a too-short packet"
- " from %s!\n",st->name, sender
?sender->name:"(local)"
);
+ " from %s!\n",st->name, sender
_name(sender)
);
BUF_FREE(buf);
return;
}
BUF_FREE(buf);
return;
}