History log of /netbsd-src/sys/netmpls/mpls_ttl.c (Results 1 – 15 of 15)
Revision Date Author Comments
# 506a6ab3 27-Dec-2018 maxv <maxv@NetBSD.org>

Remove M_COPY_PKTHDR, M_MOVE_PKTHDR, M_ALIGN and MH_ALIGN.


# d1579b2d 03-Sep-2018 riastradh <riastradh@NetBSD.org>

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a n

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)

show more ...


# 65f0aceb 11-May-2018 maxv <maxv@NetBSD.org>

Retire ICMPPRINTFS, it's annoying and it doesn't build.


# db5deb08 11-Apr-2018 maxv <maxv@NetBSD.org>

Add one more XXX in the list.


# 7fdfbc69 19-Jan-2018 maxv <maxv@NetBSD.org>

Add XXX.


# e265d7d5 19-Jan-2018 maxv <maxv@NetBSD.org>

Move the ICMP Extension structures from mpls_ttl.c to ip_icmp.h; that's
part of the ICMP protocol (per RFC4884), and not specific to MPLS. Also
add ih_exthdr in struct icmp, the 'length' field appear

Move the ICMP Extension structures from mpls_ttl.c to ip_icmp.h; that's
part of the ICMP protocol (per RFC4884), and not specific to MPLS. Also
add ih_exthdr in struct icmp, the 'length' field appeared.

While here, style in MPLS.

show more ...


# 55408dcf 08-Dec-2017 maxv <maxv@NetBSD.org>

Style, and fix several bugs:
- ip4_check(), mpls_unlabel_inet() and mpls_unlabel_inet6() perform
pullups, so we need to pass the updated pointers back
- in mpls_lse() the route is not always fre

Style, and fix several bugs:
- ip4_check(), mpls_unlabel_inet() and mpls_unlabel_inet6() perform
pullups, so we need to pass the updated pointers back
- in mpls_lse() the route is not always freed
Looks a little better now.

show more ...


# fe6d4275 10-Jun-2016 ozaki-r <ozaki-r@NetBSD.org>

Avoid storing a pointer of an interface in a mbuf

Having a pointer of an interface in a mbuf isn't safe if we remove big
kernel locks; an interface object (ifnet) can be destroyed anytime in any
pac

Avoid storing a pointer of an interface in a mbuf

Having a pointer of an interface in a mbuf isn't safe if we remove big
kernel locks; an interface object (ifnet) can be destroyed anytime in any
packet processing and accessing such object via a pointer is racy. Instead
we have to get an object from the interface collection (ifindex2ifnet) via
an interface index (if_index) that is stored to a mbuf instead of an
pointer.

The change provides two APIs: m_{get,put}_rcvif_psref that use psref(9)
for sleep-able critical sections and m_{get,put}_rcvif that use
pserialize(9) for other critical sections. The change also adds another
API called m_get_rcvif_NOMPSAFE, that is NOT MP-safe and for transition
moratorium, i.e., it is intended to be used for places where are not
planned to be MP-ified soon.

The change adds some overhead due to psref to performance sensitive paths,
however the overhead is not serious, 2% down at worst.

Proposed on tech-kern and tech-net.

show more ...


# d938d837 10-Jun-2016 ozaki-r <ozaki-r@NetBSD.org>

Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcv

Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.

show more ...


# a79dfa5d 26-Apr-2016 ozaki-r <ozaki-r@NetBSD.org>

Sweep unnecessary route.h inclusions


# 1c4a50f1 24-Aug-2015 pooka <pooka@NetBSD.org>

sprinkle _KERNEL_OPT


# a502ce7a 07-Aug-2013 kefren <kefren@NetBSD.org>

reserve space for ICMP header accordingly to RFC4884


# 6fc9085e 05-Jul-2010 kefren <kefren@NetBSD.org>

do some rudimentary checks on ip4 header before passing packet to
mpls_icmp_error


# ec6d386e 02-Jul-2010 kefren <kefren@NetBSD.org>

* correct packet size
* fix crash when cluster was involved
* extension offset is constant
* fix endianess issues in BoS loop
* free cluster if INET not defined but icmp_respond sysctl != 1


# 826653c1 26-Jun-2010 kefren <kefren@NetBSD.org>

Add MPLS support, proposed on tech-net@ a couple of days ago

Welcome to 5.99.33