Commit 25ca8b4
tools/mptcpify: mask socket type before matching SOCK_STREAM
The hook receives the raw type with SOCK_NONBLOCK/SOCK_CLOEXEC still
ORed in, so callers like curl that pass SOCK_STREAM|SOCK_NONBLOCK never
match "type == SOCK_STREAM" and aren't converted to MPTCP. Use
(type & SOCK_TYPE_MASK) == SOCK_STREAM instead.
Suggested-by: Guillaume @layus Maudoux <layus.on@gmail.com>
Signed-off-by: Gang Yan <yangang@kylinos.cn>1 parent 45348ee commit 25ca8b4
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
66 | | - | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| |||
0 commit comments