Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Options IP_MULTICAST_TTL and IP_MULTICAST_LOOP are 1 byte on BSD #68313

Merged
merged 4 commits into from
Jan 21, 2020
Merged

Options IP_MULTICAST_TTL and IP_MULTICAST_LOOP are 1 byte on BSD #68313

merged 4 commits into from
Jan 21, 2020

Conversation

batrla
Copy link

@batrla batrla commented Jan 17, 2020

Options IP_MULTICAST_TTL and IP_MULTICAST_LOOP are 1 byte on BSD and Solaris

See ip(4P) man page:
IP_MULTICAST_TTL Time to live for multicast datagrams. This option
takes an unsigned character as an argument. Its
value is the TTL that IP uses on outgoing multi-
cast datagrams. The default is 1.

IP_MULTICAST_LOOP Loopback for multicast datagrams. Normally multi-
cast datagrams are delivered to members on the
sending host (or sending zone). Setting the
unsigned character argument to 0 causes the oppo-
site behavior, meaning that when multiple zones
are present, the datagrams are delivered to all
zones except the sending zone.

https://docs.oracle.com/cd/E88353_01/html/E37851/ip-4p.html
https://man.openbsd.org/ip.4

…Solaris

See ip(4P) man page:
 IP_MULTICAST_TTL     Time  to live for multicast datagrams. This option
                      takes an unsigned character as  an  argument.  Its
                      value  is  the TTL that IP uses on outgoing multi-
                      cast datagrams. The default is 1.

 IP_MULTICAST_LOOP    Loopback for multicast datagrams. Normally  multi-
                      cast  datagrams  are  delivered  to members on the
                      sending  host  (or  sending  zone).  Setting   the
                      unsigned  character argument to 0 causes the oppo-
                      site behavior, meaning that  when  multiple  zones
                      are  present,  the  datagrams are delivered to all
                      zones except the sending zone.

https://docs.oracle.com/cd/E88353_01/html/E37851/ip-4p.html
https://man.openbsd.org/ip.4
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cramertj (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 17, 2020
@rust-highfive
Copy link
Collaborator

Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-01-17T15:14:04.3017986Z ========================== Starting Command Output ===========================
2020-01-17T15:14:04.3019483Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/74818a25-f97e-48be-8336-fa57410b8897.sh
2020-01-17T15:14:04.3019522Z 
2020-01-17T15:14:04.3077871Z ##[section]Finishing: Disable git automatic line ending conversion
2020-01-17T15:14:04.3082947Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68313/merge to s
2020-01-17T15:14:04.3084459Z Task         : Get sources
2020-01-17T15:14:04.3084488Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-17T15:14:04.3084516Z Version      : 1.0.0
2020-01-17T15:14:04.3084542Z Author       : Microsoft
---
2020-01-17T15:14:05.3587109Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-17T15:14:05.3604047Z ##[command]git config gc.auto 0
2020-01-17T15:14:05.3608065Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-17T15:14:05.3610193Z ##[command]git config --get-all http.proxy
2020-01-17T15:14:05.3628068Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68313/merge:refs/remotes/pull/68313/merge

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@cramertj
Copy link
Member

r? @alexcrichton

@alexcrichton
Copy link
Member

Thanks for the PR! Could this perhaps use cfg_if! to cut down on all the #[cfg] noise?

@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-01-17T22:35:50.7337436Z ========================== Starting Command Output ===========================
2020-01-17T22:35:50.7340788Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/7e4eada4-a71b-459d-8ba2-ab1c50de820a.sh
2020-01-17T22:35:50.7340969Z 
2020-01-17T22:35:50.7344827Z ##[section]Finishing: Disable git automatic line ending conversion
2020-01-17T22:35:50.7350865Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68313/merge to s
2020-01-17T22:35:50.7352425Z Task         : Get sources
2020-01-17T22:35:50.7352457Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-17T22:35:50.7352632Z Version      : 1.0.0
2020-01-17T22:35:50.7352669Z Author       : Microsoft
---
2020-01-17T22:35:55.0786796Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-17T22:35:55.1112176Z ##[command]git config gc.auto 0
2020-01-17T22:35:55.1191578Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-17T22:35:55.1246378Z ##[command]git config --get-all http.proxy
2020-01-17T22:35:55.1397263Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68313/merge:refs/remotes/pull/68313/merge
---
2020-01-17T22:41:08.8077419Z     Checking panic_abort v0.0.0 (/checkout/src/libpanic_abort)
2020-01-17T22:41:09.9019628Z     Checking backtrace v0.3.40
2020-01-17T22:41:10.4342389Z     Checking rustc-std-workspace-alloc v1.99.0 (/checkout/src/tools/rustc-std-workspace-alloc)
2020-01-17T22:41:10.4353294Z     Checking panic_unwind v0.0.0 (/checkout/src/libpanic_unwind)
2020-01-17T22:41:11.9903985Z error: type `ip_mcast_type_v4` should have an upper camel case name
2020-01-17T22:41:11.9904832Z   --> src/libstd/sys_common/net.rs:49:14
2020-01-17T22:41:11.9905125Z    |
2020-01-17T22:41:11.9905505Z 49 |         type ip_mcast_type_v4 = c_int;
2020-01-17T22:41:11.9906099Z    |              ^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `IpMcastTypeV4`
2020-01-17T22:41:11.9906788Z    = note: `-D non-camel-case-types` implied by `-D warnings`
2020-01-17T22:41:11.9906836Z 
2020-01-17T22:41:13.9028497Z error: aborting due to previous error
2020-01-17T22:41:13.9029095Z 
---
2020-01-17T22:41:13.9031424Z   local time: Fri Jan 17 22:41:13 UTC 2020
2020-01-17T22:41:14.1421241Z   network time: Fri, 17 Jan 2020 22:41:14 GMT
2020-01-17T22:41:14.1423763Z == end clock drift check ==
2020-01-17T22:41:15.0968779Z 
2020-01-17T22:41:15.1103840Z ##[error]Bash exited with code '1'.
2020-01-17T22:41:15.1116769Z ##[section]Finishing: Run build
2020-01-17T22:41:15.1133924Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68313/merge to s
2020-01-17T22:41:15.1135944Z Task         : Get sources
2020-01-17T22:41:15.1136016Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-17T22:41:15.1136068Z Version      : 1.0.0
2020-01-17T22:41:15.1136117Z Author       : Microsoft
2020-01-17T22:41:15.1136117Z Author       : Microsoft
2020-01-17T22:41:15.1136186Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-01-17T22:41:15.1136242Z ==============================================================================
2020-01-17T22:41:15.5703021Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-01-17T22:41:15.5744636Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/68313/merge to s
2020-01-17T22:41:15.5870049Z Cleaning up task key
2020-01-17T22:41:15.5870933Z Start cleaning up orphan processes.
2020-01-17T22:41:15.5994522Z Terminate orphan process: pid (3409) (python)
2020-01-17T22:41:15.6211377Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexcrichton
Copy link
Member

@bors: r+

Thanks for the drive-by cleanups! Always appreciated :)

@bors
Copy link
Contributor

bors commented Jan 21, 2020

📌 Commit 5392442 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 21, 2020
Centril added a commit to Centril/rust that referenced this pull request Jan 21, 2020
Options IP_MULTICAST_TTL and IP_MULTICAST_LOOP are 1 byte on BSD

Options IP_MULTICAST_TTL and IP_MULTICAST_LOOP are 1 byte on BSD and Solaris

See ip(4P) man page:
 IP_MULTICAST_TTL     Time  to live for multicast datagrams. This option
                      takes an unsigned character as  an  argument.  Its
                      value  is  the TTL that IP uses on outgoing multi-
                      cast datagrams. The default is 1.

 IP_MULTICAST_LOOP    Loopback for multicast datagrams. Normally  multi-
                      cast  datagrams  are  delivered  to members on the
                      sending  host  (or  sending  zone).  Setting   the
                      unsigned  character argument to 0 causes the oppo-
                      site behavior, meaning that  when  multiple  zones
                      are  present,  the  datagrams are delivered to all
                      zones except the sending zone.

https://docs.oracle.com/cd/E88353_01/html/E37851/ip-4p.html
https://man.openbsd.org/ip.4
bors added a commit that referenced this pull request Jan 21, 2020
Rollup of 7 pull requests

Successful merges:

 - #67686 (Simplify NodeHeader by avoiding slices in BTreeMaps with shared roots)
 - #68140 (Implement `?const` opt-out for trait bounds)
 - #68313 (Options IP_MULTICAST_TTL and IP_MULTICAST_LOOP are 1 byte on BSD)
 - #68328 (Actually pass target LLVM args to LLVM)
 - #68399 (check_match: misc unifications and ICE fixes)
 - #68415 (tidy: fix most clippy warnings)
 - #68416 (lowering: cleanup some hofs)

Failed merges:

r? @ghost
@bors bors merged commit 5392442 into rust-lang:master Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants