ext/sockets: Merge setting mcast option code for IPv4 and 6#18724
ext/sockets: Merge setting mcast option code for IPv4 and 6#18724Girgias wants to merge 2 commits intophp:masterfrom
Conversation
|
I understand the sentiment, hopefully these changes won t bring more issues than it tries to solve. Going to check on my mac what s wrong. |
| return php_do_mcast_opt(php_sock, level, optname, arg4); | ||
|
|
||
| case IP_MULTICAST_IF: | ||
| case IPV6_MULTICAST_IF: |
There was a problem hiding this comment.
yeah ... I m afraid you just can t do this that way. on mac those two has same values.
There was a problem hiding this comment.
Yeah and also Windows... Probably doable with some #if preprocessor directives tho.
|
do not see much of an option has having two still separated ipv4/ipv6 switches but within the same call (e.g. then passing ipv6 flag ?), not sure how much it s worth it though. |
|
@devnexen do you know if |
Normally you should get an EINVAL errno error. |
|
Not sure if I want to remember what's going on in this PR if on top it doesn't seem to be worth it. |
The handling for IPv4 and 6 seems similar enough that having two different functions doesn't seem to be worth it.