X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/6e3fd952d7052293905334a3bb3911c775222ea6..3ed1846a624d9428c48528d6464126b7459ad462:/netlink.c diff --git a/netlink.c b/netlink.c index 2c3d12d..3726456 100644 --- a/netlink.c +++ b/netlink.c @@ -831,7 +831,7 @@ static void netlink_incoming(struct netlink *st, struct netlink_client *client, BUF_FREE(buf); return; } - assert(buf->size >= (int)sizeof(struct icmphdr)); + assert(buf->size >= (int)sizeof(struct iphdr)); iph=(struct iphdr *)buf->start; source=ntohl(iph->saddr); @@ -1028,12 +1028,16 @@ static void netlink_inst_set_mtu(void *sst, int32_t new_mtu) } static void netlink_inst_reg(void *sst, netlink_deliver_fn *deliver, - void *dst) + void *dst, uint32_t *localmtu_r) { struct netlink_client *c=sst; + struct netlink *st=c->nst; c->deliver=deliver; c->dst=dst; + + if (localmtu_r) + *localmtu_r=st->mtu; } static struct flagstr netlink_option_table[]={