Commit graph

54 commits

Author SHA1 Message Date
David Lamparter 38ea0258ae zebra: implement RFC8781 (NAT64 prefix in RAs)
This tells hosts on the subnet if (and which) NAT64 prefix is in use.
Useful for things like xlat464, or local dns64.

Updated from the previous -03 draft implementation.  (PLC field did not
exist before.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-04-15 14:20:05 +02:00
Soumya Roy 6a75d33b5c zebra: Bring up 514 BGP neighbor sessions
Issue:
When 514 inerfaces/neighbors are configured, it creates socket error,
"Cannot allocate memory", when back to back V6 RA messages are tried
to be sent over the socket. This prevents interface, to know its peer's
link local address. Socket error comes when 1) try to join ICMPv6 all
router multicast group, back to back for all interfaces 2)send back to
back RA for all interfaces

Fix:
1)For ICMPv6 join case, we check if the interface has already joined
all router group, if not try to join. On failure, retry joining after
random amount of time determined 1 ms to ICMPV6_JOIN_TIMER_EXP_MS(100 ms)
2) For RA issue case, batch sending of RA mesages using wheel timer

Testing:
Monitor BGP session running sh bgp summary command

Before fix:
r1# sh bgp summary

IPv4 Unicast Summary:
BGP router identifier 192.168.1.1, local AS number 1001 VRF default vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 515, using 12 MiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
r1-eth0         4       1002        89        90        0    0    0 00:07:10            0        0 N/A
r1-eth1         4       1002        89        90        0    0    0 00:07:10            0        0 N/A
r1-eth2         4       1002        89        90        0    0    0 00:07:10            0        0 N/A
r1-eth3         4       1002        89        90        0    0    0 00:07:10            0        0 N/A
r1-eth4         4       1002        89        90        0    0    0 00:07:10            0        0 N/A
r1-eth5         4       1002        89        90        0    0    0 00:07:10            0        0 N/A

…..<snip>...
r1-eth252       4       1002        31        29        0    0    0 00:02:08            0        0 N/A
r1-eth253       4       1002        31        29        0    0    0 00:02:08            0        0 N/A
r1-eth254       4       1002        31        29        0    0    0 00:02:08            0        0 N/A
r1-eth255       4       1002        31        29        0    0    0 00:02:08            0        0 N/A
r1-eth256       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth257       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth258       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth259       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth260       4          0         0         0        0    0    0    never         Idle        0 N/A
……..<snip>…..
r1-eth511       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth512       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth513       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth514       4          0         0         0        0    0    0    never         Idle        0 N/A
After fix:
r1# show bgp summary

IPv4 Unicast Summary:
BGP router identifier 192.168.1.1, local AS number 1001 VRF default vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 515, using 12 MiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
r1-eth0         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
r1-eth1         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
r1-eth2         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
r1-eth3         4       1002        64        67        0    0    0 00:05:09            0        0 N/A
r1-eth4         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
r1-eth5         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
r1-eth6         4       1002        67        70        0    0    0 00:05:22            0        0 N/A
r1-eth7         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
r1-eth8         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
....
r1-eth499       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth500       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth501       4       1002        19        22        0    0    0 00:01:21            0        0 N/A
r1-eth502       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth503       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth504       4       1002        20        23        0    0    0 00:01:30            0        0 N/A
r1-eth505       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth506       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth507       4       1002        22        25        0    0    0 00:01:39            0        0 N/A
r1-eth508       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth509       4       1002        17        20        0    0    0 00:01:13            0        0 N/A
r1-eth510       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth511       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth512       4       1002        19        22        0    0    0 00:01:22            0        0 N/A
r1-eth513       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth514       4       1002        43        43        0    0    0 00:03:22            0        0 N/A

Signed-off-by: Soumya Roy <souroy@nvidia.com>
2025-03-05 06:15:56 +00:00
Igor Ryzhov 27c21ffd94 zebra: convert interface ipv6 nd dnssl command to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov 61c7ba7557 zebra: convert interface ipv6 nd rdnss command to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov 36131494c2 zebra: convert interface ipv6 nd prefix command to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov 5d029a0e87 zebra: convert interface ipv6 nd ra interval/lifetime commands to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:39 +02:00
Igor Ryzhov d617c9175a zebra: convert interface ipv6 nd suppress-ra command to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:39 +02:00
Donald Sharp 8fcacf6803 zebra: Don't leak memory in rtadv.c code on shutdown
The adata variable was being leaked on shutdown since
it was calloc'ed.  There is no need to make this dynamic
memory.  Just choose a size and use that.  Add a bit
of code to ensure that if it's not large enough,
it will just stop and the developer will fix it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-12 13:29:47 -05:00
Donald Sharp e6685141aa *: Rename struct thread to struct event
Effectively a massive search and replace of
`struct thread` to `struct event`.  Using the
term `thread` gives people the thought that
this event system is a pthread when it is not

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:17 -04:00
David Lamparter acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
Donald Sharp d9f11963c8 zebra: Notice Optional Router Advertisement types that are not handled
Currently when zebra receives a RA with optional types, note
the optional types that we are ignoring.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-12-17 16:32:13 -05:00
David Lamparter 7ca9c407ed zebra: clean up rtadv integration
Move a few things into places they actually belong, and reduce the
number of places we have `#ifdev HAVE_RTADV`.  Just overall code
prettification.

... I had actually done this quite a while ago while doing some other
random hacking and thought it more useful to not be sitting on it on my
disk...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-21 14:14:01 +02:00
Donald Sharp 954e1a2bc9 zebra: Add knowledge about RA and RFC 5549 to show zebra
Add to `show zebra` whether or not RA is compiled into FRR
and whether or not BGP is using RFC 5549 at the moment.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-04 10:29:38 -05:00
Stephen Worley 7c2ddfb976 zebra: rework RA handling for vrf-lite
Rework RA handling for vrf-lite scenarios.

Before we were using a single FD descriptor for polling
across multiple zvrf's. This would cause us to hit this
assert() in some bgp unnumbered and vrrp configs:

```
/*
 * What happens if we have a thread already
 * created for this event?
 */
if (thread_array[fd])
	assert(!"Thread already scheduled for file descriptor");
```

We were scheduling a thread_read on the same FD for every zvrf.

With vrf-lite, RAs and ARPs are not vrf-bound, so we can just use one
rtadv instance to manage them for all VRFs. We will choose the default
VRF for this.

This patch removes the rtadv_sock altogether for zrouter and moves the
functionality this represented to the default VRF. All RAs will be
handled in the default VRF under vrf-lite configs with only one poll
thread started for it.

This patch also extends how we track subscribed interfaces (s or msec)
to use an actual sorted list by interface names rather than just a
counter. With multiple daemons turning interfaces/on/off these counters
can get very wrong during ifup/down events. Making them a sorted list
prevents this from happening by preventing duplicates.

With netns-vrf's nothing should change other than the interface list.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2021-06-08 15:05:43 -04:00
Donald Sharp 57dd86429f zebra: Remove enum around ipv6_nd_suppress_ra_status
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:08:04 -04:00
Donald Sharp aab5893aa6 zebra: Don't kill the global rtadv socket when a vrf is deleted
The rtadv code has two types of sockets:
a) namespace -> Where each zvrf get's it's own socket
b) vrf lite -> Where we get 1 socket for everything

When we were terminating a vrf we were *always*
killing the (b) socket.  This is a mistake in
that other vrf's may need to be communicating.

Modify the code on vrf shutdown to only disable
that vrf's event processing and when we actually
terminate we shut the socket.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-04-02 11:38:26 -04:00
Don Slice 2a85576310 zebra: add all ipv6 global addresses to RA messages
RFC 4861 states that ipv6 RA messages sent out an interface should
contain all global ipv6 addresses on that interface. This fix adds
that capability.  To override the default flags and timer settings
for a particular prefix, the existing "ipv6 nd prefix ..." command
should be used via vtysh under the appropriate interface.

Ticket: CM-20363
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2020-02-14 17:03:16 +00:00
Don Slice d7fc0e677e zebra: send RA lifetime of 0 before ceasing to advertise RAs
Problem reported by testing agency that RFC4861 section 6.2.5
states that a router should send an RA with a lifetime of 0
before ceasing to send RAs on the interface, or when the interace
is shutdown, or the router is shutdown.  This fix adds that capability.

Ticket: CM-27061
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2019-12-03 15:46:34 +00:00
David Lamparter 2b64873d24 *: generously apply const
const const const your boat, merrily down the stream...

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-02 15:01:29 +01:00
Don Slice adee8f2164 zebra: knob to make ra retransmit interval rfc compliant
Problem reported by testing facility that our sending of Router
Advertisements more frequently than once very three seconds is not
compliant with rfc4861. Added a knob to turn off fast retransmits
in order to meet the requirement of the RFC.

Ticket: CM-27063
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2019-11-22 18:40:20 +00:00
Philippe Guibert df9c8c5742 zebra: move rtadv service from zrouter to zvrf
when network namespace is used as vrf backend, there is need to have
separate contexts for rtadv contexts.
route advertisements have to look for appropriate interface based on
zvrf context.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2019-06-04 18:33:53 +02:00
Donald Sharp 3ce3185a63 Revert "zebra: move rtadv service from zrouter to zvrf"
This reverts commit f20e2a09c8.
2019-05-16 14:13:40 -04:00
Philippe Guibert f20e2a09c8 zebra: move rtadv service from zrouter to zvrf
when network namespace is used as vrf backend, there is need to have
separate contexts for rtadv contexts.
route advertisements have to look for appropriate interface based on
zvrf context.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2019-04-25 14:23:34 +02:00
Emanuele Di Pascale 51e94aa7b1 add cplusplus guards to all zebra headers
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2019-03-25 16:05:27 +01:00
Lars Seipel 3eb4fbb0f5 zebra: support DNS configuration options in rtadv
Add support for the RDNSS and DNSSL router advertisement
options described in RFC 8106.

Signed-off-by: Lars Seipel <ls@slrz.net>
2019-02-02 19:10:19 +01:00
Quentin Young a75b6ff5b1
Revert "zebra: implement draft-bz-v4goawayflag-00"
This reverts commit 3fec765a8d.

April fools!

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-04-02 15:26:06 -04:00
Quentin Young 3fec765a8d
zebra: implement draft-bz-v4goawayflag-00
Adds support for V4 GoAway flag as described in
https://www.ietf.org/id/draft-bz-v4goawayflag-00.txt

This option allows advertising neighbors to indicate to recipients that
they should disable IPv4 on the link.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-04-01 16:37:24 -04:00
Quentin Young d7c0a89a3a
*: use C99 standard fixed-width integer types
The following types are nonstandard:
- u_char
- u_short
- u_int
- u_long
- u_int8_t
- u_int16_t
- u_int32_t

Replace them with the C99 standard types:
- uint8_t
- unsigned short
- unsigned int
- unsigned long
- uint8_t
- uint16_t
- uint32_t

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-27 15:13:34 -04:00
Quentin Young 1002497af5
zebra: reorganize zserv, batch i/o
Group send and receive functions together, change handlers to take a
message instead of looking at ->ibuf and ->obuf, allow zebra to read
multiple packets off the wire at a time.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-12 14:57:05 -04:00
Quentin Young 89f4e5077b
zebra: standardize ZAPI message handler args
A lot of the handler functions that are called directly from the ZAPI
input processing code take different argument sets where they don't need
to. These functions are called from only one place and all have the same
fundamental information available to them to do their work. There is no
need to specialize what information is passed to them; it is cleaner and
easier to understand when they all accept the same base set of
information and extract what they need inline.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-12 14:57:05 -04:00
Lou Berger 996c93142d *: conform with COMMUNITY.md formatting rules, via 'make indent'
Signed-off-by: Lou Berger <lberger@labn.net>
2018-03-06 14:04:32 -05:00
Donald Sharp e4bd522a31 zebra: No need to pass sock descriptor around.
Standardize the api to read zapi requests from protocols.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-23 18:09:22 -04:00
David Lamparter 2eb27eecf0 zebra: start detangling rtadv & irdp
Replace some cross-dependencies with hooks & move bits to where they
belong.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15 13:25:44 +02:00
whitespace / reindent d62a17aede *: reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17 14:04:07 +02:00
David Lamparter 896014f4bc *: make consistent & update GPLv2 file headers
The FSF's address changed, and we had a mixture of comment styles for
the GPL file header.  (The style with * at the beginning won out with
580 to 141 in existing files.)

Note: I've intentionally left intact other "variations" of the copyright
header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15 16:37:41 +02:00
Timo Teräs a879f2f815 zebra: fix build with rtadv disabled
Otherwise we get warning on rtadv_init() prototype not being
defined when compiling rtadv.c (as dummy stub is provided always).

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-06-08 14:15:47 -04:00
vivek 4a04e5f796 BGP: Trigger IPv6 router advertisements upon config of unnumbered neighbor
Instead of turning on IPv6 RA on every interface as soon as it has an IPv6
address, only enable it upon configuration of BGP neighbor. When the BGP
neighbor is deleted, signal that RAs can be turned off.

To support this, introduce new message interaction between BGP and Zebra.
Also, take appropriate actions in BGP upon interface add/del since the
unnumbered neighbor could exist prior to interface creation etc.

Only unnumbered IPv6 neighbors require RA, the /30 or /31 based neighbors
don't. However, to keep the interaction simple and not have to deal with
too many dynamic conditions (e.g., address deletes or neighbor change to/from
'v6only'), RAs on the interface are triggered upon any unnumbered neighbor
configuration.

BGP-triggered RAs will cause RAs to be initiated on the interface; however,
if BGP asks that RAs be stopped (upon delete of unnumbered neighbor), RAs
will continue to be exchanged if the operator has explicitly enabled.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>

Ticket: CM-10640
Reviewed By: CCR-4589
Testing Done: Various manual and automated (refer to defect)
2016-05-02 13:53:38 -07:00
vivek c23af4d3e6 Zebra: Restrict IPv6 RA to valid interfaces
Restrict interfaces on which IPv6 Router Advertisements are allowed. The list
excludes loopback interfaces including the VRF device interface; specific to
Cumulus, it also includes "switch0" and "ethX" interfaces.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Don Slice <dslice@cumulusnetworks.com>

Ticket: CM-9849
Reviewed By: CCR-4334
Testing Done: Manual
2016-03-22 16:52:35 +00:00
Donald Sharp 000cf1fb35 debian, config, zebra: Ensure Cumulus Extensions are not auto turned on
There exist cases where Cumulus Code( in this case code surrounding
when we want to send Router Advertisements ) should only be
turned on for Cumulus Switches.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-02-23 07:46:54 -05:00
vivek 43459b1f09 Zebra: Make RA socket operation on a per-NS basis
This patch reorganizes the RA handling to be per namespace rather than per
VRF. The VRF library by 6wind had done the original change to make the RA
data structures (socket information) per VRF, but this was correct only if
each VRF represented a NS. In our reorganization, we have created a NS
structure (struct zebra_ns) and VRFs don't correspond to namespaces (i.e.,
all VRFs exist in the default namespace). So, the RA handling should be
done under 'struct zebra_ns'.

With the changes, there is a single raw socket per NS (=> 1 for us) on which
we will receive and handle RAs for all interfaces. The interface information
is available through cmsg and the processing will then happen for that interface.

There is a problem with transmitting RAs over a VRF interface. This is
tracked by CM-9398.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>

Ticket: CM-9206
Reviewed By: CCR-4217
Testing Done: Manual testing
2016-02-19 14:55:36 -08:00
vivek 30a3822f2b Zebra: Restrict automatic RA enable to relevant interfaces
When enabling IPv6 Router Advertisements automatically based on the
presence of IPv6 address on an interface, do it only for relevant
interfaces.

Note: This needs a configure option for completion.

Ticket: CM-9358
Reviewed By: CCR-4116
Testing Done: Manual verification
2016-02-18 18:47:32 -08:00
Daniel Walton b612050594 Enable IPv6 ND RA for interfaces that have an IPv6 address
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>

Ticket: CM-7932
2015-12-07 13:05:34 -08:00
Donald Sharp 8da4e9466a Quagga: Cleanup RTADV define
The RTADV define was not being set correctly or consistently.
Make the code consistent with our HAVE_IPV6 define.

If the user wants to explicitly turn it off then they should
run --disable-rtadv from the configure cli

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2015-11-20 07:07:41 -08:00
Feng Lu cd80d74fb2 zebra: maintain RTADV per VRF
This moves the global variable "rtadv" into the "struct zebra_vrf",
so that RTADV feature can work per VRF.

* rtadv.c/rtadv.h:

  Add a proper parameter to the functions so that the entity of the
  "struct zebra_vrf" and interfaces can be obtained from the specified
  VRF.

  The old rtadv_init() is splitted into:
  - rtadv_cmd_init(): it installs the RTADV commands; is called from
                      main();
  - new rtadv_init(): it creates the socket; is called from
                      zebra_vrf_enable().

  rtadv_terminate() is added to stop the threads, close the socket and
  clear the counters. It is called from zebra_vrf_disable().

  rtadv_make_socket() now calls vrf_socket() to create a socket in
  the VRF.

* interface.h and rib.h: define the macro RTADV.
* main.c: according changes, refer to rtadv.c.

Signed-off-by: Feng Lu <lu.feng@6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

Conflicts:
	zebra/interface.h
	zebra/rib.h
	zebra/rtadv.c
	zebra/rtadv.h
2015-10-30 00:57:27 -07:00
Joachim Nilsson 36735ed988 zebra: fix up compilation without rtadv/IPv6
let's ground the rtadv.h file if route advertisements are disabled. And
fix up the CLI for it, as well as move the "show ip mroute" to its
proper place.

  * zebra/rtadv.h: #ifdef RTADV
  * zebra/main.c: #ifdef RTADV
  * zebra/zebra_vty.c: move "show ip mroute" out of #ifdef IPV6

From: Joachim Nilsson <troglobit@gmail.com>
[moved #ifdef RTADV to rtadv.h]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-05-09 13:51:54 +02:00
Denis Ovsienko 6eb0c5ab1d zebra: freshen RFC references in rtadv
RFC2461 was replaced by RFC4861
RFC3775 was replaced by RFC6275
draft-ietf-mip6-mipext-advapi-03 was replaced by RFC4584
2012-01-26 11:42:57 +04:00
Denis Ovsienko aca43b6566 zebra: use prefix_ipv6 in rtadv_prefix
rtadv_prefix.prefix was casted to "struct prefix_ipv6" and had the same
size, make it exactly this type to make the code a bit cleaner.
2012-01-26 11:42:54 +04:00
Chris Caputo b60668d092 RFC 4191 Default Router Preference support for router advertisements
Adds "ipv6 nd router-preference (high|medium|low)" and
"no ipv6 nd router-preference" interface commands.

Files modified:

   doc/ipv6.texi
   zebra/interface.c
   zebra/interface.h
   zebra/rtadv.c
   zebra/rtadv.h

Signed-off-by: Chris Caputo <ccaputo@alt.net>
2009-06-23 14:15:57 +01:00
Paul Jakma 30a2231a48 [warnings] Fix various SOS warnings
2008-08-15 Paul Jakma <paul.jakma@sun.com>

	* */*: Fix various problems flagged by Sun Studio compiler.
	  - '<qualifier> <storage>' obsolescent in declarations
	  - empty statements (';' after ALIAS definitions)
	  - implicit declarations (e.g printstack in lib/log.c)
	  - "\%" in printf string instead of "%%"
	  - loops that return on the first iteration (legitimately, but
 	    compiler can't really know), e.g. bgp_routemap.c
 	  - internal declarations which mask prototypes.
2008-08-22 19:52:59 +01:00
Paul Jakma 6f0e3f6e17 [autoconf] bugs 162,303,178: Fix 'present but can not be compiled' warnings
2007-05-09 Paul Jakma <paul.jakma@sun.com>

	* configure.ac: sys/conf.h depends on sys/param.h, at least on
	  FBSD 6.2.
	  (bug #363) Should check for in_pktinfo for IRDP

2006-05-27 Paul Jakma <paul.jakma@sun.com>

	* configure.ac: General cleanup of header and type checks, introducing
	  an internal define, QUAGGA_INCLUDES, to build up a list of
	  stuff to include so as to avoid 'present but cant be compiled'
	  warnings.
	  Misc additional checks of things missing according to autoscan.
	  Add LIBM, for bgpd's use of libm, so as to avoid burdening
	  LIBS, and all the binaries, with libm linkage.
	  Remove the bad practice of using m4 changequote(), just
	  quote the []'s in the case statements properly.
	  This should fix bugs 162, 303 and 178.
	* */*.{c,h}: Update all HAVE_* to the standard autoconf namespaced
	  HAVE_* defines. I.e. HAVE_SA_LEN -> HAVE_STRUCT_SOCKADDR_SA_LEN,
	* bgpd/Makefile.am: Add LIBM to bgpd's LDADD, for pow().
2007-05-10 02:38:51 +00:00