mbox series

[net-next,0/2] icmp: move duplicate code in helper functions

Message ID 20191102001204.83883-1-mcroce@redhat.com
Headers show
Series icmp: move duplicate code in helper functions | expand

Message

Matteo Croce Nov. 2, 2019, 12:12 a.m. UTC
Remove some duplicate code by moving it in two helper functions.
First patch adds the helpers, the second one uses it.

Matteo Croce (2):
  icmp: add helpers to recognize ICMP error packets
  icmp: remove duplicate code

 include/linux/icmp.h                    | 15 +++++++++++++++
 include/linux/icmpv6.h                  | 14 ++++++++++++++
 net/ipv4/netfilter/nf_socket_ipv4.c     | 10 +---------
 net/ipv4/route.c                        |  5 +----
 net/ipv6/route.c                        |  5 +----
 net/netfilter/nf_conntrack_proto_icmp.c |  6 +-----
 net/netfilter/xt_HMARK.c                |  6 +-----
 net/sched/act_nat.c                     |  4 +---
 8 files changed, 35 insertions(+), 30 deletions(-)

Comments

David Miller Nov. 5, 2019, 10:03 p.m. UTC | #1
From: Matteo Croce <mcroce@redhat.com>
Date: Sat,  2 Nov 2019 01:12:02 +0100

> Remove some duplicate code by moving it in two helper functions.
> First patch adds the helpers, the second one uses it.

Series applied.