Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

CIRCLE / cloud

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 94
  • Merge Requests 10
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Merged
Merge request !46 opened Mar 22, 2014 by Bach Dániel@bachdaniel 
  • Report abuse
Report abuse

Feature: Improve Firewall

✅ tests

  • Discussion 5
  • Commits 20
  • Changes
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Őry Máté
    @orymate started a discussion on an old version of the diff Mar 23, 2014
    circle/firewall/fw.py
    138 ipv6 = IPAddress(ipv6, version=6)
    293 139 octets = []
    294 for part in ipv6.split(':'):
    295 if not part:
    296 octets.extend([0, 0])
    297 else:
    298 # Pad hex part to 4 digits.
    299 part = '%04x' % int(part, 16)
    300 octets.append(int(part[:2], 16))
    301 octets.append(int(part[2:], 16))
    140 for part in ipv6.words:
    141 # Pad hex part to 4 digits.
    142 part = '%04x' % part
    143 octets.append(int(part[:2], 16))
    144 octets.append(int(part[2:], 16))
    302 145 return '\\' + '\\'.join(['%03o' % x for x in octets])
    • Őry Máté @orymate commented Mar 23, 2014
      Owner

      return "".join(r"\%03o" % x for x in octets) Fixed @ 4f0c58b6

      Edited Mar 25, 2014
      `return "".join(r"\%03o" % x for x in octets)` Fixed @ 4f0c58b61
    Please register or sign in to reply
  • Őry Máté
    @orymate started a discussion on an old version of the diff Mar 23, 2014
    Last updated by Bach Dániel Mar 27, 2014
    circle/firewall/models.py
    58 59 blank=True, null=True, verbose_name=_("source port"),
    59 60 validators=[MinValueValidator(1), MaxValueValidator(65535)],
    60 61 help_text=_("Source port number of packets that match."))
    62 priority = models.IntegerField(
    63 verbose_name=_("priority"),
    64 validators=[MinValueValidator(1), MaxValueValidator(65535)],
    65 help_text=_("TODO"),
    66 default=1000)
    61 67 proto = models.CharField(max_length=10, choices=CHOICES_proto,
    62 68 blank=True, null=True, verbose_name=_("protocol"),
    63 69 help_text=_("Protocol of packets that match."))
    64 70 extra = models.TextField(blank=True, verbose_name=_("extra arguments"),
    65 71 help_text=_("Additional arguments passed "
    66 72 "literally to the iptables-rule."))
    67 accept = models.BooleanField(default=False, verbose_name=_("accept"),
    73 accept = models.BooleanField(default=True, verbose_name=_("accept"),
    • Őry Máté @orymate commented Mar 23, 2014
      Owner

      might be choices field of ignore/accept/deny

      might be choices field of ignore/accept/deny
    • Bach Dániel @bachdaniel commented Mar 27, 2014
      Owner

      fixed @ 551b4fdf

      fixed @ 551b4fdf
    Please register or sign in to reply
  • Őry Máté
    @orymate started a discussion on an old version of the diff Mar 23, 2014
    circle/firewall/models.py
    449 501  
    450 502 @property
    451 503 def incoming_rules(self):
    452 return self.rules.filter(direction='1')
    504 return self.rules.filter(direction='in')
    505
    506 @property
    507 def ipv6_with_prefixlen(self):
    508 try:
    509 net = IPNetwork(self.ipv6)
    510 net.prefixlen = 112
    • Őry Máté @orymate commented Mar 23, 2014
      Owner

      magic number? fixed

      Edited Apr 10, 2014
      ~~magic number?~~ fixed
    Please register or sign in to reply
  • Őry Máté
    @orymate started a discussion on commit 4f0c58b6 Mar 25, 2014
    • Őry Máté @orymate

      mentioned in merge request !46 (merged)

      Mar 25, 2014

      mentioned in merge request !46 (merged)

      mentioned in merge request !46
      Toggle commit list
    Please register or sign in to reply
  • Bach Dániel
    @bachdaniel started a discussion on commit 551b4fdf Mar 27, 2014
    • Bach Dániel @bachdaniel

      mentioned in merge request !46 (merged)

      Mar 27, 2014

      mentioned in merge request !46 (merged)

      mentioned in merge request !46
      Toggle commit list
    Please register or sign in to reply
  • Őry Máté @orymate commented Apr 10, 2014
    Owner

    👍

    :+1:
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Bach Dániel
Assignee
Bach Dániel @bachdaniel
Assign to
First revision
Milestone
First revision
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View labels
2
2 participants
Reference: circle/cloud!46