Commit dc5e014
nexthop: Only parse NHA_OP_FLAGS for get messages that require it
The attribute is parsed into 'op_flags' in nh_valid_get_del_req() which
is called from the handlers of three message types: RTM_DELNEXTHOP,
RTM_GETNEXTHOPBUCKET and RTM_GETNEXTHOP. The attribute is only used by
the latter and rejected by the policies of the other two.
Pass 'op_flags' as NULL from the handlers of the other two and only
parse the attribute when the argument is not NULL.
This is a preparation for a subsequent patch.
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240311162307.545385-2-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 5f20e6a commit dc5e014
1 file changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3230 | 3230 | | |
3231 | 3231 | | |
3232 | 3232 | | |
3233 | | - | |
3234 | | - | |
3235 | | - | |
3236 | | - | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
3237 | 3239 | | |
3238 | 3240 | | |
3239 | 3241 | | |
| |||
3250 | 3252 | | |
3251 | 3253 | | |
3252 | 3254 | | |
3253 | | - | |
3254 | 3255 | | |
3255 | 3256 | | |
3256 | 3257 | | |
| |||
3259 | 3260 | | |
3260 | 3261 | | |
3261 | 3262 | | |
3262 | | - | |
| 3263 | + | |
3263 | 3264 | | |
3264 | 3265 | | |
3265 | 3266 | | |
| |||
3716 | 3717 | | |
3717 | 3718 | | |
3718 | 3719 | | |
3719 | | - | |
3720 | 3720 | | |
3721 | 3721 | | |
3722 | 3722 | | |
3723 | 3723 | | |
3724 | 3724 | | |
3725 | 3725 | | |
3726 | 3726 | | |
3727 | | - | |
| 3727 | + | |
3728 | 3728 | | |
3729 | 3729 | | |
3730 | 3730 | | |
| |||
0 commit comments