OpenBSD CVS

CVS log for src/usr.sbin/bgpd/pftable.c


[BACK] Up to [local] / src / usr.sbin / bgpd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.18 / (download) - annotate - [select for diffs], Tue Feb 13 16:35:43 2024 UTC (3 months, 2 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.17: +3 -6 lines
Diff to previous 1.17 (colored)

Use an C99 anonymous union inside struct bgpd_addr

This kills the two far to generic v4 and v6 macros which is a big win.
OK tb@

Revision 1.17 / (download) - annotate - [select for diffs], Wed Aug 17 15:15:26 2022 UTC (21 months, 2 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.16: +5 -5 lines
Diff to previous 1.16 (colored)

Convert bzero() to memset(), bcmp() to memcmp() and bcopy() to memcpy().

The memory regions passed to memcpy() can not overlap so no need for memmove().
OK tb@ deraadt@

Revision 1.16 / (download) - annotate - [select for diffs], Sun Feb 6 09:51:19 2022 UTC (2 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

Switch from u_intX_t types to stdint.h uintX_t. Mostly mechanical with
a few reindents.
OK florian@ tb@

Revision 1.15 / (download) - annotate - [select for diffs], Fri Oct 4 11:40:42 2019 UTC (4 years, 7 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.14: +6 -3 lines
Diff to previous 1.14 (colored)

Instead of calling fatal() when pftable additions and deletions mix
commit the pending work and therefore start a new worklist. The delayed
commits can cause such situations to happen and there is no reason to
panic because of this.
Problem found by jmc@
OK benno@

Revision 1.14 / (download) - annotate - [select for diffs], Thu Aug 8 20:06:29 2019 UTC (4 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)

Use O_CLOEXEC or SOCK_CLOEXEC on every open or socket call. Even though
some sockets are open for a short time it does not hurt and it ensures
that there is no file descriptor leak.
OK deraadt@ bluhm@

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:47 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Nov 25 15:31:12 2018 UTC (5 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.11: +2 -3 lines
Diff to previous 1.11 (colored)

malloc(n) + bzero is better done as calloc(1,n)

Revision 1.11 / (download) - annotate - [select for diffs], Thu Sep 20 11:06:04 2018 UTC (5 years, 8 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.10: +1 -2 lines
Diff to previous 1.10 (colored)

whitespace cleanup, ok claudio@

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jan 24 04:22:42 2017 UTC (7 years, 4 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.9: +3 -1 lines
Diff to previous 1.9 (colored)

sync log.c from relayd et al to bgpd.

there is still a little difference regarding handling of the verbosity
value that will be handled later.

ok claudio@ florian@

Revision 1.9 / (download) - annotate - [select for diffs], Wed Dec 23 20:42:20 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.8: +4 -7 lines
Diff to previous 1.8 (colored)

Remove NULL-checks before free(). I think I've almost scrubbed the
entire tree of these...

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jan 21 21:50:32 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.7: +2 -1 lines
Diff to previous 1.7 (colored)

Include <netinet/in.h> before <net/pfvar.h>.  In a future change when
ports is ready, <net/pfvar.h> will stop including a pile of balony.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Oct 8 16:15:37 2014 UTC (9 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

Use reallocarray() throughout to spot multiplicative int overflow.
ok henning benno

Revision 1.6 / (download) - annotate - [select for diffs], Tue Dec 1 14:28:05 2009 UTC (14 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Use an artificial address family id in struct bgpd_addr and almost everywhere
else. Adds conversion functions to map AFI/SAFI and the Unix AF_ values
from and into AID used in bgpd.  This is needed to support things like MPLS
VPN and other upcomming changes that need to play a lot with AFI/SAFI pairs.
Mostly mechanical change, henning@ has no particular issues with this.
Must go in so that I can continue working.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jul 1 09:19:24 2005 UTC (18 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

Make the pftable filter set use the name2id "cache" like the route labels.
This saves 14 bytes per aspath. OK henning@

Revision 1.4 / (download) - annotate - [select for diffs], Tue Nov 2 17:00:52 2004 UTC (19 years, 7 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored)

don't leak mem on strlcpy failure, Patrick Latifi

Revision 1.3 / (download) - annotate - [select for diffs], Tue Sep 14 23:08:44 2004 UTC (19 years, 8 months ago) by henning
Branch: MAIN
Changes since 1.2: +4 -4 lines
Diff to previous 1.2 (colored)

gccisms are bad, including __func__
requested by theo

Revision 1.2 / (download) - annotate - [select for diffs], Sat May 8 19:17:20 2004 UTC (20 years ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

KNF

Revision 1.1 / (download) - annotate - [select for diffs], Fri May 7 10:06:15 2004 UTC (20 years ago) by djm
Branch: MAIN

add a filter option to dump prefixes learned in UPDATEs into a PF table,
intended for building realtime BGP blacklists (e.g. with spamd);
ok claudio & henning

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.