Projet

Général

Profil

Révision af544fea

IDaf544fea6fe8a0a96f6cfa38b9f9f690fafaa1c1
Parent 9adf6851
Enfant 351a88fb

Ajouté par tr il y a plus de 4 ans

Create a special ingoing chain for all ingoing fwd rules

Voir les différences:

manifests/chain.pp
6 6
    $chain = $title,
7 7
  Optional[Pattern[/^\d\d-[a-zA-Z0-9_]+$/]]
8 8
    $inject = undef,
9
  Optional[String]
10
    $inject_iif = undef,
11
  Optional[String]
12
    $inject_oif = undef,
9 13
){
10 14
  $concat_name = "nftables-${table}-chain-${chain}"
11 15

  
......
33 37

  
34 38
  if $inject {
35 39
    $data = split($inject, '-')
40
    $iif = $inject_iif ? {
41
      undef => '',
42
      default => "iifname ${inject_iif} ",
43
    }
44
    $oif = $inject_oif ? {
45
      undef => '',
46
      default => "oifname ${inject_oif} ",
47
    }
36 48
    nftables::rule{ "${data[1]}-jump_${chain}":
37 49
      order   => $data[0],
38
      content => "jump ${chain}",
50
      content => "${iif}${oif}jump ${chain}",
39 51
    }
40 52
  }
41 53
}

Formats disponibles : Unified diff