~ubuntu-branches/ubuntu/trusty/juju-core/trusty-proposed

« back to all changes in this revision

Viewing changes to src/code.google.com/p/go.net/ipv6/icmp_linux.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-04-12 07:04:37 UTC
  • mfrom: (1.1.23)
  • Revision ID: package-import@ubuntu.com-20140412070437-jub6rry6bdr9rqw1
Tags: 1.18.1-0ubuntu1
* New upstream point release, including fixes for:
  - Upgrading juju 1.16.6 -> 1.18.x fails (LP: #1299802).
  - Peer relation disappears during juju-upgrade (LP: #1303697).
  - public-address of units changes to internal bridge post upgrade
    (LP: #1303735).
  - Unable to deploy local charms without series (LP: #1303880).
  - juju scp no longer allows multiple extra arguments to be passed
    (LP: #1306208).
  - juju cannot downgrade to same major.minor version with earlier
    patch number (LP: #1306296).

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
package ipv6
6
6
 
7
 
import "syscall"
8
 
 
9
 
type rawICMPFilter struct {
10
 
        syscall.ICMPv6Filter
 
7
type sysICMPFilter struct {
 
8
        Data [8]uint32
11
9
}
12
10
 
13
 
func (f *rawICMPFilter) set(typ ICMPType, block bool) {
 
11
func (f *sysICMPFilter) set(typ ICMPType, block bool) {
14
12
        if block {
15
13
                f.Data[typ>>5] |= 1 << (uint32(typ) & 31)
16
14
        } else {
18
16
        }
19
17
}
20
18
 
21
 
func (f *rawICMPFilter) setAll(block bool) {
 
19
func (f *sysICMPFilter) setAll(block bool) {
22
20
        for i := range f.Data {
23
21
                if block {
24
22
                        f.Data[i] = 1<<32 - 1
28
26
        }
29
27
}
30
28
 
31
 
func (f *rawICMPFilter) willBlock(typ ICMPType) bool {
 
29
func (f *sysICMPFilter) willBlock(typ ICMPType) bool {
32
30
        return f.Data[typ>>5]&(1<<(uint32(typ)&31)) != 0
33
31
}