summaryrefslogtreecommitdiff
path: root/meta-google/recipes-google/networking
AgeCommit message (Collapse)AuthorFilesLines
2021-12-16meta-google: nftables: Make rule loading atomicWilliam A. Kennington III1-3/+1
This ensures that all of the rules are processed and unexpected packets are not allowed or blocked by the kernel at any time. Change-Id: Ia7bb1d7f604f8ed1bd9759a23e370d20cb0c690d Signed-off-by: William A. Kennington III <wak@google.com>
2021-12-16meta-google: gbmc-bridge: Fix service permissionsWilliam A. Kennington III1-2/+2
Change-Id: I5fc6db2510b9c27d8d2ce27304e0a5e821015fb3 Signed-off-by: William A. Kennington III <wak@google.com>
2021-12-07meta-google: gbmc-bridge: Request hostname via DHCPWilliam A. Kennington III2-1/+6
Change-Id: If3dacbfde966de337702b44b9b06b3eb21755546 Signed-off-by: William A. Kennington III <wak@google.com>
2021-12-04meta-google: gbmc-bridge: Implement DHCPWilliam A. Kennington III3-1/+117
This makes it possible for a BMC to acquire a public address via DHCP provisioning. None of the update processes are included yet. Change-Id: I51ca2aa4859bcd2b9e909dd5a0d9e66cfbd648af Signed-off-by: William A. Kennington III <wak@google.com>
2021-11-06meta-google: gbmc-bridge: Defer address reconfigurationWilliam A. Kennington III1-4/+6
Reconfiguring network interfaces immediately after detecting changes may not allow them enough time to settle. Without waiting, we might pre-emptively assume the configuration is changing even though networkd is just flushing and resetting the interface with the same config. Change-Id: I6a6858578d0499305fe2a3d3592dc73533bb02f1 Signed-off-by: William A. Kennington III <wak@google.com>
2021-11-06meta-google: gbmc-ip-monitor: Add deferred actionsWilliam A. Kennington III1-2/+21
This makes it possible to defer actions for a future time in order to let networking events settle out before triggering a reconfiguration. Change-Id: I0b2372ba6b114a6b6548ccac3944af912482d68a Signed-off-by: William A. Kennington III <wak@google.com>
2021-11-06meta-google: gbmc-bridge: Restrict network from /72 to /76William A. Kennington III1-2/+2
We can have multiple gBMC networks within one "machine". This allows us to have multiple address sets. Change-Id: I5b18b7822f50bb0570e1aa5a70ac47036694d922 Signed-off-by: William A. Kennington III <wak@google.com>
2021-10-26meta-google: gbmc-bridge: Don't enable DHCPv6William A. Kennington III1-0/+2
Just turning DHCP off via the DHCP= option is not enough. If you use IPv6AcceptRA=true you need to also disable the DHCPv6Client= in the IPv6AcceptRA section. Change-Id: I6e2e6e3f9b9395bd690f3d1a8915fac5061a0b25 Signed-off-by: William A. Kennington III <wak@google.com>
2021-10-14meta-google: gbmc-mac-config: Use ipmi_fru_allocWilliam A. Kennington III1-1/+1
This will allow us to implement other types of FRU path lookup mechanisms beyond the OF name one that is currently in use. This change is fully backward compatible. Change-Id: Icedecedc9fcaad75fa32c23142a0fd3dfa7f6c0d Signed-off-by: William A. Kennington III <wak@google.com>
2021-09-12meta-google: gbmc-bridge: Fix nftables rules for local BMC addressWilliam A. Kennington III1-3/+11
We want to use sets instead of separate rules for each address. This also ensures that packets coming from internal sources are matched as internal packets. Change-Id: Iff87b81c48c7491a74af1a2cead4cabcb56d81a0 Signed-off-by: William A. Kennington III <wak@google.com>
2021-08-07meta-google: Cleanup for Yocto override syntax changeWilly Tu6-23/+23
``` convert-overrides.py meta-google git grep "_[a-z0-9_/-]*[ :]" -- meta-google | grep ".bb" git grep -l _gbmc -- meta-google | grep ".bb" \ | xargs sed -i 's/_gbmc/:gbmc/' git grep -l _prod -- meta-google | grep ".bb" \ | xargs sed -i 's/_prod/:prod/' git grep -l _dev -- meta-google | grep ".bb" \ | xargs sed -i 's/_dev/:dev/' git grep -l _hoth -- meta-google | grep ".bb" \ | xargs sed -i 's/_hoth/:hoth/' git grep -l _bandaid -- meta-google | grep ".bb" \ | xargs sed -i 's/_bandaid/:bandaid/' ``` Some small fix includes ``` platforms_gbmc_bringup platforms_gbmc_secure ``` Tested: ``` $ git grep "_[a-z0-9_/-]*[ :]" -- meta-google | grep ".bb" meta-google/recipes-connectivity/avahi/avahi_%.bbappend:do_install:append:gbmc() { meta-google/recipes-core/dropbear/dropbear_%.bbappend:do_install:append:gbmc:dev() { meta-google/recipes-core/dropbear/dropbear_%.bbappend: echo ' chain gbmc_br_pub_input {' >>"$rules" meta-google/recipes-extended/libconfig/conf2struct-native_git.bb: oe_runmake checker meta-google/recipes-extended/libconfig/conf2struct-native_git.bb: oe_runmake install meta-google/recipes-extended/networking/mstpd_git.bb:do_install:append() { meta-google/recipes-extended/networking/sslh_git.bb: oe_runmake distclean meta-google/recipes-extended/networking/sslh_git.bb: oe_runmake sslh-conf.h meta-google/recipes-extended/networking/sslh_git.bb: oe_runmake install meta-google/recipes-google/ipmi/ipmi-fru-sh.bb:do_install:append() { meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb:do_install:append() { meta-google/recipes-google/networking/gbmc-bridge.bb:do_rm_work:prepend() { meta-google/recipes-google/networking/gbmc-bridge.bb: # HACK: Work around broken do_rm_work not properly calling rm with `--` meta-google/recipes-google/networking/gbmc-ip-monitor.bb:do_install:append() { meta-google/recipes-google/networking/gbmc-iperf3.bb:do_install:append:dev() { meta-google/recipes-google/networking/gbmc-iperf3.bb: echo ' chain gbmc_br_pub_input {' >>"$rules" meta-google/recipes-google/networking/gbmc-mac-config.bb:do_install:append() { meta-google/recipes-google/networking/network-sh.bb:do_install:append() { meta-google/recipes-google/ssh/authorized-keys-comp.bb:SUMMARY = "Compiles a set of authorized_keys files into a single file" meta-google/recipes-google/ssh/authorized-keys-comp.bb:do_install:append() { meta-google/recipes-google/systemd/gbmc-systemd-config.bb:do_install:append:dev() { meta-google/recipes-google/test/test-sh.bb:do_install:append() { meta-google/recipes-phosphor/flash/inplace-gbmc-update.bb:do_install:prepend:dev() { meta-google/recipes-phosphor/host/phosphor-host-postd_%.bbappend:do_install:append:gbmc:dev() { meta-google/recipes-phosphor/initrdscripts/obmc-phosphor-initfs.bbappend:do_install:append:gbmc:dev() { meta-google/recipes-phosphor/initrdscripts/obmc-phosphor-initfs.bbappend:do_install:append:gbmc:prod() { meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend:do_install:append:gbmc() { meta-google/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend: overlapping="$(jq '."${GBMCBR_IPMI_CHANNEL}" | .is_valid and .name != "gbmcbr"' $chjson)" ``` Change-Id: I9d610c664bd44e8bd81fb8f7e76249a0b43b9ffd Signed-off-by: Willy Tu <wltu@google.com>
2021-08-05meta-google: Add google-usb-network recipeMaksym Sloyko5-0/+559
Add recipe for bringing up USB ECM network devices. The recipe generates * network configuration file for the interface; * systemd service that starts(stops) the USB Gadget The ECM gadget, as well as the network interface are expected to be fully configured in the bbappend file. Signed-off-by: Maksym Sloyko <maxims@google.com> Change-Id: Ibb57584ce2bfd838e650eae7a4d3935c9580e502
2021-05-13meta-google: gbmc-bridge: Fix do_rm_workWilliam A. Kennington III1-2/+1
The workdir will be empty if the package is populated from the sstate, fix the command to work for this case. Change-Id: Ie262a69de067e94e9da32ca8a89d1db1a5ab5bf2 Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-13meta-google: gbmc-bridge: Workaround do_rm_workWilliam A. Kennington III1-0/+7
Otherwise when using a posix shell it will fail with: Step #1: | ERROR: Execution of '/workspace/ci_workspace/gbmc/build/tmp/work/armv7a-openbmc-linux-gnueabi/gbmc-bridge/1.0-r1/temp/run.do_rm_work.40349' failed with exit code 1: Step #1: | grep: invalid max count Step #1: | rm: invalid option -- 'b' Step #1: | Try 'rm ./-bmc-gbmcbr.netdev' to remove the file '-bmc-gbmcbr.netdev'. Step #1: | Try 'rm --help' for more information. Step #1: | WARNING: exit code 1 from a shell command. Change-Id: Ie846810b3c5e187d20c18f843ff8e4b0851ed5df Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-13meta-google: gbmc-bridge: Remove bashismWilliam A. Kennington III1-3/+2
Appending strings is a bashism and can't be used in bitbake shell. Change-Id: Ie4f75367cc59000595afc68431ff98dbfc4b16c6 Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-12meta-google: gbmc-bridge: Fix gw source checkWilliam A. Kennington III1-1/+1
The conversion to ip_to_bytes picked the wrong address bytes off by one. This fixes it and verifies that a machine now updates the address. Change-Id: Ifc7bbebc0cf500d51d01d693445aa2533122e9a1 Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-12meta-google: gbmc-bridge: Fix misconfigured MACWilliam A. Kennington III3-12/+10
The network addresses derived from the MAC address are supposed to go in the .network file instead of the .netdev file. Change-Id: I9e9dc2c213414ae458392beab32334b89a897267 Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-11meta-google: gbmc-bridge: Use networkctl reconfigureWilliam A. Kennington III1-4/+7
The other workarounds to try and restart networkd tend to result in flaky behavior. We get much more consistent and fast reconfigurations if we target the bridge directly. Change-Id: I3222eba4a2d2b71e3893f93643f412e5238ee60e Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-11meta-google: network-sh: Convert to IP bytesWilliam A. Kennington III5-56/+123
Now that we can convert to and from IP bytes, we should use them everywhere to ensure values are parsed correctly. Change-Id: I995091d1eff670db6678b4a2f4a64113e93308f7 Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-11meta-google: network-sh: Add ip_bytes_to_strWilliam A. Kennington III2-0/+84
This makes it possible to get a human readable address back from a byte array. Change-Id: Ifcc98bcc95b8d75fe7d1aae1c264cbddf3fc5bd0 Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-10meta-google: gbmc-bridge: Look at IP bytes instead of regexWilliam A. Kennington III2-5/+23
Change-Id: Ie3a20df633346692039103edc882e202b7c3309b Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-10meta-google: network-sh: Add ip_to_bytes functionWilliam A. Kennington III2-3/+166
This will be used to compare parts of addresses instead of applying regexes to them. Change-Id: Ide7366cab967e31a74cbb4002bad1046432037e3 Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-10meta-google: gbmc-bridge: Set default route sourceWilliam A. Kennington III2-0/+67
This change ensures that ULA addresses don't get used as the source when trying to send packets outside the machine. Change-Id: I46413a2587634a79f0c0fc4051587e39a9fdcf50 Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-10meta-google: gbmc-bridge: Recognize public addresses internallyWilliam A. Kennington III2-0/+65
We want to be able to categorize public addresses being used for internal traffic, and allow them to access internal services. Change-Id: I1f4b8eaa329954f330c3052c0c789b8e5e3b4662 Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-07meta-google: gbmc-bridge: Assign stable addresses from RAsWilliam A. Kennington III5-1/+138
We want BMCs to be able to discover their machine prefix and assign a stable IPv6 based on that prefix combined with the MAC of the BMC. Change-Id: I67b8c56f50ff3a970175abcb81b429ceb1258b69 Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-07meta-google: gbmc-bridge: Don't hardcode MACWilliam A. Kennington III1-1/+2
We want to eventually replace the link layer address with an address from an EEPROM. This change keeps the hardcoded address that services depend on, but allows for the MAC to be changed. Change-Id: I748fab21561f0f22ec0790487755e29e9aecd1b0 Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-07meta-google: gbmc-bridge: Discover ULA addresses at runtimeWilliam A. Kennington III2-0/+75
If the bridge interface is assigned a MAC at runtime then it needs to add the appropriate ULA address for that MAC. Change-Id: Ia109c36320a78bb02ba9b54038ca23b0d3e2c948 Signed-off-by: William A. Kennington III <wak@google.com>
2021-05-07meta-google: gbmc-bridge: Add packageWilliam A. Kennington III9-2/+145
This adds a machine local ethernet network which allows BMCs to communicate with one another. Change-Id: I5e0ace231af02d84f7678b8241b5ec71823e86af Signed-off-by: William A. Kennington III <wak@google.com>
2021-04-29meta-google: gbmc-ip-monitor: Fix missing variableWilliam A. Kennington III1-1/+1
Change-Id: I3cc51f3d5885e983ca6f901c103eec4e64c9943c Signed-off-by: William A. Kennington III <wak@google.com>
2021-04-23meta-google: gbmc-ip-monitor: Add packageWilliam A. Kennington III4-0/+347
Add a daemon that monitors all link / addr / route changes on a system, and runs a set of installed hooks to perform customized behavior when these changes occur. Change-Id: Id2a6b7dc2534ebae1beca7135528a6e1e4eada57 Signed-off-by: William A. Kennington III <wak@google.com>
2021-04-23meta-google: network-sh: Add libraryWilliam A. Kennington III3-0/+213
Provides a utility for working with network type data. Right now this is just for MAC address parsing and conversion to EUI{48,64}. Change-Id: I49946d8147f1c7b10cfe3a9e55b20fc30c083eda Signed-off-by: William A. Kennington III <wak@google.com>
2021-03-09meta-google: gbmc-iperf3: Allow for DEV buildsWilliam A. Kennington III1-3/+15
Change-Id: Ib2cc970201324affc212b644598ef39f4cafffbb Signed-off-by: William A. Kennington III <wak@google.com>
2021-03-09meta-google: gbmc-mac-config: Add packageWilliam A. Kennington III3-0/+142
This package allows a system to specify an IPMI FRU that contains MAC Address information used to populated MAC addresses for specified interfaces. Change-Id: I457d41509da0e63db4410937b84140d4ba410b41 Signed-off-by: William A. Kennington III <wak@google.com>
2021-02-17meta-google: Fold gbmc-sslh into gbmc-ncsi-configWilliam A. Kennington III3-51/+0
Logically these packages belong together and don't make much sense without each other. Combine them to reduce package complexity for users. Change-Id: I3d3998f8d10cacbd01f6d883b0033a3260ff60df Signed-off-by: William A. Kennington III <wak@google.com>
2021-02-16meta-google: recipes-google: networking: gbmc-sslh: Import from gBMCWilly Tu3-0/+51
Initial recipes-google/networking gbmc-sslh code from gBMC. Google-Bug-Id: 179617830 Upstream: 8ac594bdf054082ca6dbe35c4345759fe4c31669 Change-Id: I9d7cdcad8a816dd878cdbb2e30272ac7f223d49e Signed-off-by: Willy Tu <wltu@google.com>
2021-02-12meta-google: recipes-google: networking: iperf3: Import from gBMCWilly Tu2-0/+39
Initial recipes-google/networking iperf3 code from gBMC. Google-Bug-Id: 179617830 Upstream: 8ac594bdf054082ca6dbe35c4345759fe4c31669 Signed-off-by: Willy Tu <wltu@google.com> Change-Id: I686a3debd6b6647ce215253c555f208d2a5e46f2