From f4ce43e1f426148d99c28c1b0e5c43ddda17a8cb Mon Sep 17 00:00:00 2001
From: Nicolas Lacasse <nlacasse@google.com>
Date: Mon, 29 Apr 2019 14:03:04 -0700
Subject: Allow and document bug ids in gVisor codebase.

PiperOrigin-RevId: 245818639
Change-Id: I03703ef0fb9b6675955637b9fe2776204c545789
---
 pkg/sentry/socket/netlink/route/protocol.go |  8 ++++----
 pkg/sentry/socket/netlink/socket.go         | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

(limited to 'pkg/sentry/socket/netlink')

diff --git a/pkg/sentry/socket/netlink/route/protocol.go b/pkg/sentry/socket/netlink/route/protocol.go
index 7e70b09b2..e414b829b 100644
--- a/pkg/sentry/socket/netlink/route/protocol.go
+++ b/pkg/sentry/socket/netlink/route/protocol.go
@@ -110,7 +110,7 @@ func (p *Protocol) dumpLinks(ctx context.Context, hdr linux.NetlinkMessageHeader
 		m.PutAttr(linux.IFLA_ADDRESS, mac)
 		m.PutAttr(linux.IFLA_BROADCAST, brd)
 
-		// TODO: There are many more attributes.
+		// TODO(b/68878065): There are many more attributes.
 	}
 
 	return nil
@@ -122,7 +122,7 @@ func (p *Protocol) dumpAddrs(ctx context.Context, hdr linux.NetlinkMessageHeader
 	// netlink header and 1 byte protocol family common to all
 	// NETLINK_ROUTE requests.
 	//
-	// TODO: Filter output by passed protocol family.
+	// TODO(b/68878065): Filter output by passed protocol family.
 
 	// The RTM_GETADDR dump response is a set of RTM_NEWADDR messages each
 	// containing an InterfaceAddrMessage followed by a set of netlink
@@ -151,7 +151,7 @@ func (p *Protocol) dumpAddrs(ctx context.Context, hdr linux.NetlinkMessageHeader
 
 			m.PutAttr(linux.IFA_ADDRESS, []byte(a.Addr))
 
-			// TODO: There are many more attributes.
+			// TODO(b/68878065): There are many more attributes.
 		}
 	}
 
@@ -175,7 +175,7 @@ func (p *Protocol) ProcessMessage(ctx context.Context, hdr linux.NetlinkMessageH
 		}
 	}
 
-	// TODO: Only the dump variant of the types below are
+	// TODO(b/68878065): Only the dump variant of the types below are
 	// supported.
 	if hdr.Flags&linux.NLM_F_DUMP != linux.NLM_F_DUMP {
 		return syserr.ErrNotSupported
diff --git a/pkg/sentry/socket/netlink/socket.go b/pkg/sentry/socket/netlink/socket.go
index 0fe9b39b6..a34f9d3ca 100644
--- a/pkg/sentry/socket/netlink/socket.go
+++ b/pkg/sentry/socket/netlink/socket.go
@@ -168,7 +168,7 @@ func (s *Socket) EventUnregister(e *waiter.Entry) {
 
 // Ioctl implements fs.FileOperations.Ioctl.
 func (s *Socket) Ioctl(ctx context.Context, io usermem.IO, args arch.SyscallArguments) (uintptr, error) {
-	// TODO: no ioctls supported.
+	// TODO(b/68878065): no ioctls supported.
 	return 0, syserror.ENOTTY
 }
 
@@ -319,7 +319,7 @@ func (s *Socket) GetSockOpt(t *kernel.Task, level int, name int, outLen int) (in
 			t.Kernel().EmitUnimplementedEvent(t)
 		}
 	}
-	// TODO: other sockopts are not supported.
+	// TODO(b/68878065): other sockopts are not supported.
 	return nil, syserr.ErrProtocolNotAvailable
 }
 
@@ -369,7 +369,7 @@ func (s *Socket) SetSockOpt(t *kernel.Task, level int, name int, opt []byte) *sy
 		}
 
 	}
-	// TODO: other sockopts are not supported.
+	// TODO(b/68878065): other sockopts are not supported.
 	return syserr.ErrProtocolNotAvailable
 }
 
@@ -389,7 +389,7 @@ func (s *Socket) GetSockName(t *kernel.Task) (interface{}, uint32, *syserr.Error
 func (s *Socket) GetPeerName(t *kernel.Task) (interface{}, uint32, *syserr.Error) {
 	sa := linux.SockAddrNetlink{
 		Family: linux.AF_NETLINK,
-		// TODO: Support non-kernel peers. For now the peer
+		// TODO(b/68878065): Support non-kernel peers. For now the peer
 		// must be the kernel.
 		PortID: 0,
 	}
@@ -540,7 +540,7 @@ func (s *Socket) processMessages(ctx context.Context, buf []byte) *syserr.Error
 			continue
 		}
 
-		// TODO: ACKs not supported yet.
+		// TODO(b/68877377): ACKs not supported yet.
 		if hdr.Flags&linux.NLM_F_ACK == linux.NLM_F_ACK {
 			return syserr.ErrNotSupported
 		}
-- 
cgit v1.2.3