diff options
| author | Paul Donald | 2024-12-13 03:17:50 +0000 |
|---|---|---|
| committer | Robert Marko | 2025-04-02 08:58:38 +0000 |
| commit | 61ae5732adea8bafcdf158c979a0a0d68b2cff62 (patch) | |
| tree | 1cf95ac479ceace1ad6b7093f3bc6f04c2af4038 | |
| parent | ea01ed41f3212ecbe000422f3c122a01b93fe874 (diff) | |
| download | netifd-61ae5732adea8bafcdf158c979a0a0d68b2cff62.tar.gz | |
iprule: amend ipproto netlink nla_put_u32 to nla_put_u8
FRA_IP_PROTO expects an 8 bit value.
Follow-up fix for d29cf707478cfc5465fc8a7b8ccfde72a739a4f6.
uint8 prevents the kernel log message:
netlink: 'netifd': attribute type 22 has an invalid length.
The message is otherwise harmless; ip rules using ipproto are created
successfully.
Tested on 24.10-snapshot
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/netifd/pull/42
Signed-off-by: Robert Marko <robimarko@gmail.com>
| -rw-r--r-- | system-linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system-linux.c b/system-linux.c index 3fff641..945ca4c 100644 --- a/system-linux.c +++ b/system-linux.c @@ -3578,7 +3578,7 @@ static int system_iprule(struct iprule *rule, int cmd) nla_put_u32(msg, FRA_GOTO, rule->gotoid); if (rule->flags & IPRULE_IPPROTO) - nla_put_u32(msg, FRA_IP_PROTO, rule->ipproto); + nla_put_u8(msg, FRA_IP_PROTO, rule->ipproto); return system_rtnl_call(msg); } |