vxcan.c (7ae9fb1b7ecbb5d85d07857943f677fd1a559b18) | vxcan.c (f534f6581ec084fe94d6759f7672bd009794b07e) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * vxcan.c - Virtual CAN Tunnel for cross namespace communication 4 * 5 * This code is derived from drivers/net/can/vcan.c for the virtual CAN 6 * specific parts and from drivers/net/veth.c to implement the netlink API 7 * for network interface pairs in a common and established way. 8 * --- 178 unchanged lines hidden (view full) --- 187 int err; 188 189 /* register peer device */ 190 if (data && data[VXCAN_INFO_PEER]) { 191 struct nlattr *nla_peer; 192 193 nla_peer = data[VXCAN_INFO_PEER]; 194 ifmp = nla_data(nla_peer); | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * vxcan.c - Virtual CAN Tunnel for cross namespace communication 4 * 5 * This code is derived from drivers/net/can/vcan.c for the virtual CAN 6 * specific parts and from drivers/net/veth.c to implement the netlink API 7 * for network interface pairs in a common and established way. 8 * --- 178 unchanged lines hidden (view full) --- 187 int err; 188 189 /* register peer device */ 190 if (data && data[VXCAN_INFO_PEER]) { 191 struct nlattr *nla_peer; 192 193 nla_peer = data[VXCAN_INFO_PEER]; 194 ifmp = nla_data(nla_peer); |
195 err = rtnl_nla_parse_ifla(peer_tb, 196 nla_data(nla_peer) + 197 sizeof(struct ifinfomsg), 198 nla_len(nla_peer) - 199 sizeof(struct ifinfomsg), 200 NULL); | 195 err = rtnl_nla_parse_ifinfomsg(peer_tb, nla_peer, extack); |
201 if (err < 0) 202 return err; 203 204 tbp = peer_tb; 205 } 206 207 if (ifmp && tbp[IFLA_IFNAME]) { 208 nla_strscpy(ifname, tbp[IFLA_IFNAME], IFNAMSIZ); --- 119 unchanged lines hidden --- | 196 if (err < 0) 197 return err; 198 199 tbp = peer_tb; 200 } 201 202 if (ifmp && tbp[IFLA_IFNAME]) { 203 nla_strscpy(ifname, tbp[IFLA_IFNAME], IFNAMSIZ); --- 119 unchanged lines hidden --- |