patchpanel: Log rtentry value
BUG=none
TEST=none
Change-Id: I75b5547fa1deb9e87277ca2dc4b3f73cea08a7d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2334969
Reviewed-by: Hugo Benichi <hugobenichi@google.com>
Tested-by: Andreea-Elena Costinas <acostinas@google.com>
Commit-Queue: Andreea-Elena Costinas <acostinas@google.com>
diff --git a/patchpanel/datapath.cc b/patchpanel/datapath.cc
index 521cbd1..cbd0fbb 100644
--- a/patchpanel/datapath.cc
+++ b/patchpanel/datapath.cc
@@ -574,17 +574,17 @@
bool Datapath::ModifyRtentry(unsigned long op, struct rtentry* route) {
DCHECK(route);
if (op != SIOCADDRT && op != SIOCDELRT) {
- LOG(ERROR) << "Invalid operation " << op << " for rtentry " << route;
+ LOG(ERROR) << "Invalid operation " << op << " for rtentry " << *route;
return false;
}
base::ScopedFD fd(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0));
if (!fd.is_valid()) {
- PLOG(ERROR) << "Failed to create socket for adding rtentry " << route;
+ PLOG(ERROR) << "Failed to create socket for adding rtentry " << *route;
return false;
}
if (HANDLE_EINTR(ioctl_(fd.get(), op, route)) != 0) {
std::string opname = op == SIOCADDRT ? "add" : "delete";
- PLOG(ERROR) << "Failed to " << opname << " rtentry " << route;
+ PLOG(ERROR) << "Failed to " << opname << " rtentry " << *route;
return false;
}
return true;