Commit fe840dda authored by Maria Matejka's avatar Maria Matejka
Browse files

Merge commit 'a9646efd' into sark-bgp-rebased

parents 14bb6fd2 a9646efd
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -154,9 +154,9 @@ docker_ubuntu-20_04-amd64:
    IMG_NAME: "ubuntu-20.04-amd64"
  <<: *docker_build

docker_ubuntu-20_10-amd64:
docker_ubuntu-21_10-amd64:
  variables:
    IMG_NAME: "ubuntu-20.10-amd64"
    IMG_NAME: "ubuntu-21.10-amd64"
  <<: *docker_build

# GPG error
@@ -318,9 +318,9 @@ build-ubuntu-20_04-amd64:
  <<: *build-linux
  image: registry.nic.cz/labs/bird:ubuntu-20.04-amd64

build-ubuntu-20_10-amd64:
build-ubuntu-21_10-amd64:
  <<: *build-linux
  image: registry.nic.cz/labs/bird:ubuntu-20.10-amd64
  image: registry.nic.cz/labs/bird:ubuntu-21.10-amd64

#build-ubuntu-21_04-amd64:
#  <<: *build-linux
@@ -465,10 +465,11 @@ pkg-ubuntu-20.04-amd64:
  needs: [build-ubuntu-20_04-amd64]
  image: registry.nic.cz/labs/bird:ubuntu-20.04-amd64

pkg-ubuntu-20.10-amd64:

pkg-ubuntu-21.10-amd64:
  <<: *pkg-deb
  needs: [build-ubuntu-20_10-amd64]
  image: registry.nic.cz/labs/bird:ubuntu-20.10-amd64
  needs: [build-ubuntu-21_10-amd64]
  image: registry.nic.cz/labs/bird:ubuntu-21.10-amd64

#pkg-ubuntu-21.04-amd64:
#  <<: *pkg-deb
+12 −0
Original line number Diff line number Diff line
@@ -2419,6 +2419,12 @@ using the following configuration parameters:
	same address family and using the same local port) should have set
	<cf/strict bind/, or none of them. Default: disabled.

	<tag><label id="bgp-free-bind">free bind <m/switch/</tag>
	Use IP_FREEBIND socket option for the listening socket, which allows
	binding to an IP address not (yet) assigned to an interface. Note that
	all BGP instances that share a listening socket should have the same
	value of the <cf/freebind/ option. Default: disabled.

	<tag><label id="bgp-check-link">check link <M>switch</M></tag>
	BGP could use hardware link state into consideration.  If enabled,
	BIRD tracks the link state of the associated interface and when link
@@ -3249,6 +3255,12 @@ channels.
	allows to specify a limit on maximal number of nexthops in one route. By
	default, multipath merging is disabled. If enabled, default value of the
	limit is 16.

	<tag><label id="krt-netlink-rx-buffer">netlink rx buffer <m/number/</tag> (Linux)
	Set kernel receive buffer size (in bytes) for the netlink socket. The default
	value is OS-dependent (from the <file>/proc/sys/net/core/rmem_default</file>
	file), If you get some "Kernel dropped some netlink message ..." warnings,
	you may increase this value.
</descrip>

<sect1>Attributes
+1 −0
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@ extern int sk_priority_control; /* Suggested priority for control traffic, shou
#define SKF_TTL_RX	0x08	/* Report TTL / Hop Limit for RX packets */
#define SKF_BIND	0x10	/* Bind datagram socket to given source address */
#define SKF_HIGH_PORT	0x20	/* Choose port from high range if possible */
#define SKF_FREEBIND	0x40	/* Allow socket to bind to a nonlocal address */

#define SKF_THREAD	0x100	/* Socked used in thread, Do not add to main loop */
#define SKF_TRUNCATED	0x200	/* Received packet was truncated, set by IO layer */
+3 −2
Original line number Diff line number Diff line
FROM ubuntu:20.10
FROM ubuntu:21.10
ENV DEBIAN_FRONTEND=noninteractive
RUN sed -i 's/deb.debian.org/ftp.cz.debian.org/' /etc/apt/sources.list
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y install \
RUN apt-get -y --no-install-recommends install \
	tzdata \
	build-essential \
	flex \
	bison \
+8 −3
Original line number Diff line number Diff line
@@ -165,12 +165,17 @@ bgp_open(struct bgp_proto *p)
  ip_addr addr = p->cf->strict_bind ? p->cf->local_ip :
    (p->ipv4 ? IPA_NONE4 : IPA_NONE6);
  uint port = p->cf->local_port;
  uint flags = p->cf->free_bind ? SKF_FREEBIND : 0;
  uint flag_mask = SKF_FREEBIND;

  /* We assume that cf->iface is defined iff cf->local_ip is link-local */

  WALK_LIST(bs, bgp_sockets)
    if (ipa_equal(bs->sk->saddr, addr) && (bs->sk->sport == port) &&
	(bs->sk->iface == ifa) && (bs->sk->vrf == p->p.vrf))
    if (ipa_equal(bs->sk->saddr, addr) &&
	(bs->sk->sport == port) &&
	(bs->sk->iface == ifa) &&
	(bs->sk->vrf == p->p.vrf) &&
	((bs->sk->flags & flag_mask) == flags))
    {
      bs->uc++;
      p->sock = bs;
@@ -184,7 +189,7 @@ bgp_open(struct bgp_proto *p)
  sk->sport = port;
  sk->iface = ifa;
  sk->vrf = p->p.vrf;
  sk->flags = SKF_PASSIVE_THREAD;
  sk->flags = flags | SKF_PASSIVE_THREAD;
  sk->tos = IP_PREC_INTERNET_CONTROL;
  sk->rbsize = BGP_RX_BUFFER_SIZE;
  sk->tbsize = BGP_TX_BUFFER_SIZE;
Loading