lwtunnel.c (8632987380765dee716d460640aa58d58d52998e) | lwtunnel.c (8bda81a4d400cf8a72e554012f0d8c45e07a3904) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * lwtunnel Infrastructure for light weight tunnels like mpls 4 * 5 * Authors: Roopa Prabhu, <roopa@cumulusnetworks.com> 6 */ 7 8#include <linux/capability.h> --- 183 unchanged lines hidden (view full) --- 192 193 while (rtnh_ok(rtnh, remaining)) { 194 attrlen = rtnh_attrlen(rtnh); 195 if (attrlen > 0) { 196 attrs = rtnh_attrs(rtnh); 197 nla_entype = nla_find(attrs, attrlen, RTA_ENCAP_TYPE); 198 199 if (nla_entype) { | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * lwtunnel Infrastructure for light weight tunnels like mpls 4 * 5 * Authors: Roopa Prabhu, <roopa@cumulusnetworks.com> 6 */ 7 8#include <linux/capability.h> --- 183 unchanged lines hidden (view full) --- 192 193 while (rtnh_ok(rtnh, remaining)) { 194 attrlen = rtnh_attrlen(rtnh); 195 if (attrlen > 0) { 196 attrs = rtnh_attrs(rtnh); 197 nla_entype = nla_find(attrs, attrlen, RTA_ENCAP_TYPE); 198 199 if (nla_entype) { |
200 if (nla_len(nla_entype) < sizeof(u16)) { 201 NL_SET_ERR_MSG(extack, "Invalid RTA_ENCAP_TYPE"); 202 return -EINVAL; 203 } |
|
200 encap_type = nla_get_u16(nla_entype); 201 202 if (lwtunnel_valid_encap_type(encap_type, 203 extack) != 0) 204 return -EOPNOTSUPP; 205 } 206 } 207 rtnh = rtnh_next(rtnh, &remaining); --- 213 unchanged lines hidden --- | 204 encap_type = nla_get_u16(nla_entype); 205 206 if (lwtunnel_valid_encap_type(encap_type, 207 extack) != 0) 208 return -EOPNOTSUPP; 209 } 210 } 211 rtnh = rtnh_next(rtnh, &remaining); --- 213 unchanged lines hidden --- |