diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 19a1ebab..cd57bff3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -73,5 +73,8 @@ jobs: password: ${{secrets.GITHUB_TOKEN}} - name: Build and push container image run: | - docker build . -f docker/Dockerfile --tag ghcr.io/holo-routing/holo:latest + docker build . -f docker/Dockerfile --tag ghcr.io/holo-routing/holo:latest ghcr.io/holo-routing/holo:0.6.0 + docker push ghcr.io/holo-routing/holo:latest + docker push ghcr.io/holo-routing/holo:0.6.0 + diff --git a/holo-bfd/src/packet.rs b/holo-bfd/src/packet.rs index 04e484b0..f570d151 100644 --- a/holo-bfd/src/packet.rs +++ b/holo-bfd/src/packet.rs @@ -103,8 +103,8 @@ impl Packet { let mut buf = buf.borrow_mut(); buf.clear(); - buf.put_u8(self.version << 5 | self.diag); - buf.put_u8((self.state as u8) << 6 | self.flags.bits()); + buf.put_u8((self.version << 5) | self.diag); + buf.put_u8(((self.state as u8) << 6) | self.flags.bits()); buf.put_u8(self.detect_mult); // The length will be initialized later. buf.put_u8(0); diff --git a/holo-ospf/src/ospfv3/packet/mod.rs b/holo-ospf/src/ospfv3/packet/mod.rs index da537cf8..cde3e62b 100644 --- a/holo-ospf/src/ospfv3/packet/mod.rs +++ b/holo-ospf/src/ospfv3/packet/mod.rs @@ -915,12 +915,12 @@ fn packet_options(data: &[u8]) -> Option { match pkt_type { PacketType::Hello => { let options = &data[PacketHdr::LENGTH as usize + 6..]; - let options = (options[0] as u16) << 8 | options[1] as u16; + let options = ((options[0] as u16) << 8) | options[1] as u16; Some(Options::from_bits_truncate(options)) } PacketType::DbDesc => { let options = &data[PacketHdr::LENGTH as usize + 2..]; - let options = (options[0] as u16) << 8 | options[1] as u16; + let options = ((options[0] as u16) << 8) | options[1] as u16; Some(Options::from_bits_truncate(options)) } PacketType::LsRequest | PacketType::LsUpdate | PacketType::LsAck => { diff --git a/holo-vrrp/src/packet.rs b/holo-vrrp/src/packet.rs index 01688dc4..ae96bd01 100644 --- a/holo-vrrp/src/packet.rs +++ b/holo-vrrp/src/packet.rs @@ -217,7 +217,7 @@ impl Ipv4Hdr { let mut buf = BytesMut::new(); // ver_ihl -> version[4 bits] + ihl[4 bits] - buf.put_u8(self.version << 4 | self.ihl); + buf.put_u8((self.version << 4) | self.ihl); buf.put_u8(self.tos); buf.put_u16(self.total_length); buf.put_u16(self.identification);