Commit 116bb30
bpf: Convert bpf_sock_addr_kern "uaddr" to sockaddr_unspec
Change struct bpf_sock_addr_kern to use sockaddr_unspec for the "uaddr"
field instead of sockaddr. This improves type safety in the BPF cgroup
socket address filtering code.
The casting in __cgroup_bpf_run_filter_sock_addr() is updated to match the
new type, removing an unnecessary cast in the initialization and updating
the conditional assignment to use the appropriate sockaddr_unspec cast.
Signed-off-by: Kees Cook <[email protected]>1 parent c257607 commit 116bb30
2 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1515 | 1515 | | |
1516 | 1516 | | |
1517 | 1517 | | |
1518 | | - | |
| 1518 | + | |
1519 | 1519 | | |
1520 | 1520 | | |
1521 | 1521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1673 | 1673 | | |
1674 | 1674 | | |
1675 | 1675 | | |
1676 | | - | |
| 1676 | + | |
1677 | 1677 | | |
1678 | 1678 | | |
1679 | | - | |
| 1679 | + | |
1680 | 1680 | | |
1681 | 1681 | | |
1682 | 1682 | | |
| |||
1688 | 1688 | | |
1689 | 1689 | | |
1690 | 1690 | | |
1691 | | - | |
1692 | | - | |
| 1691 | + | |
| 1692 | + | |
1693 | 1693 | | |
1694 | 1694 | | |
1695 | 1695 | | |
| |||
0 commit comments