diff --git a/include/linux/can/netlink.h b/include/linux/can/netlink.h index 25fd52cc..6d4ec2a9 100644 --- a/include/linux/can/netlink.h +++ b/include/linux/can/netlink.h @@ -98,6 +98,7 @@ struct can_ctrlmode { #define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */ #define CAN_CTRLMODE_FD 0x20 /* CAN FD mode */ #define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */ +#define CAN_CTRLMODE_FD_NON_ISO 0x80 /* CAN FD in non-ISO mode */ /* * CAN device statistics diff --git a/ip/ipneigh.c b/ip/ipneigh.c index 6be79e1a..eeec7bdd 100644 --- a/ip/ipneigh.c +++ b/ip/ipneigh.c @@ -157,14 +157,19 @@ static int ipneigh_modify(int cmd, int flags, int argc, char **argv) exit(-1); } req.ndm.ndm_family = dst.family; - addattr_l(&req.n, sizeof(req), NDA_DST, &dst.data, dst.bytelen); + if (addattr_l(&req.n, sizeof(req), NDA_DST, &dst.data, dst.bytelen) < 0) + return -1; if (lla && strcmp(lla, "null")) { char llabuf[20]; int l; l = ll_addr_a2n(llabuf, sizeof(llabuf), lla); - addattr_l(&req.n, sizeof(req), NDA_LLADDR, llabuf, l); + if (l < 0) + return -1; + + if (addattr_l(&req.n, sizeof(req), NDA_LLADDR, llabuf, l) < 0) + return -1; } ll_init_map(&rth);