blob: d534fb694daab8e5ea6df4f09330a1b42fd6880b [file] [log] [blame]
Eric W. Biederman0dc34c72011-07-13 09:48:26 -07001#define _ATFILE_SOURCE
2#include <sys/types.h>
3#include <sys/stat.h>
4#include <sys/wait.h>
5#include <sys/inotify.h>
6#include <sys/mount.h>
7#include <sys/param.h>
8#include <sys/syscall.h>
9#include <stdio.h>
10#include <string.h>
11#include <sched.h>
12#include <fcntl.h>
13#include <dirent.h>
14#include <errno.h>
15#include <unistd.h>
Eric W. Biederman9a7b3d92013-01-17 14:48:15 +000016#include <ctype.h>
Eric W. Biederman0dc34c72011-07-13 09:48:26 -070017
18#include "utils.h"
19#include "ip_common.h"
20
21#define NETNS_RUN_DIR "/var/run/netns"
22#define NETNS_ETC_DIR "/etc/netns"
23
24#ifndef CLONE_NEWNET
25#define CLONE_NEWNET 0x40000000 /* New network namespace (lo, device, names sockets, etc) */
26#endif
27
28#ifndef MNT_DETACH
29#define MNT_DETACH 0x00000002 /* Just detach from the tree */
30#endif /* MNT_DETACH */
31
Stephen Hemminger03fdb012013-04-17 13:33:26 -070032/* sys/mount.h may be out too old to have these */
33#ifndef MS_REC
34#define MS_REC 16384
35#endif
36
37#ifndef MS_SLAVE
38#define MS_SLAVE (1 << 19)
39#endif
40
41#ifndef MS_SHARED
42#define MS_SHARED (1 << 20)
43#endif
44
JunweiZhang95592b42013-07-09 08:55:20 -070045extern char *batch_file;
Stephen Hemminger03fdb012013-04-17 13:33:26 -070046
Eric W. Biederman2e8a07f2011-07-15 14:26:59 +000047#ifndef HAVE_SETNS
Eric W. Biederman0dc34c72011-07-13 09:48:26 -070048static int setns(int fd, int nstype)
49{
50#ifdef __NR_setns
51 return syscall(__NR_setns, fd, nstype);
52#else
53 errno = ENOSYS;
54 return -1;
55#endif
56}
Eric W. Biederman2e8a07f2011-07-15 14:26:59 +000057#endif /* HAVE_SETNS */
Eric W. Biederman0dc34c72011-07-13 09:48:26 -070058
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +000059static int usage(void)
Eric W. Biederman0dc34c72011-07-13 09:48:26 -070060{
61 fprintf(stderr, "Usage: ip netns list\n");
62 fprintf(stderr, " ip netns add NAME\n");
63 fprintf(stderr, " ip netns delete NAME\n");
Eric W. Biederman9a7b3d92013-01-17 14:48:15 +000064 fprintf(stderr, " ip netns identify PID\n");
65 fprintf(stderr, " ip netns pids NAME\n");
Eric W. Biederman0dc34c72011-07-13 09:48:26 -070066 fprintf(stderr, " ip netns exec NAME cmd ...\n");
67 fprintf(stderr, " ip netns monitor\n");
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +000068 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -070069}
70
71int get_netns_fd(const char *name)
72{
73 char pathbuf[MAXPATHLEN];
74 const char *path, *ptr;
75
76 path = name;
77 ptr = strchr(name, '/');
78 if (!ptr) {
79 snprintf(pathbuf, sizeof(pathbuf), "%s/%s",
80 NETNS_RUN_DIR, name );
81 path = pathbuf;
82 }
83 return open(path, O_RDONLY);
84}
85
86static int netns_list(int argc, char **argv)
87{
88 struct dirent *entry;
89 DIR *dir;
90
91 dir = opendir(NETNS_RUN_DIR);
92 if (!dir)
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +000093 return EXIT_SUCCESS;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -070094
95 while ((entry = readdir(dir)) != NULL) {
96 if (strcmp(entry->d_name, ".") == 0)
97 continue;
98 if (strcmp(entry->d_name, "..") == 0)
99 continue;
100 printf("%s\n", entry->d_name);
101 }
102 closedir(dir);
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000103 return EXIT_SUCCESS;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700104}
105
106static void bind_etc(const char *name)
107{
108 char etc_netns_path[MAXPATHLEN];
109 char netns_name[MAXPATHLEN];
110 char etc_name[MAXPATHLEN];
111 struct dirent *entry;
112 DIR *dir;
113
114 snprintf(etc_netns_path, sizeof(etc_netns_path), "%s/%s", NETNS_ETC_DIR, name);
115 dir = opendir(etc_netns_path);
116 if (!dir)
117 return;
118
119 while ((entry = readdir(dir)) != NULL) {
120 if (strcmp(entry->d_name, ".") == 0)
121 continue;
122 if (strcmp(entry->d_name, "..") == 0)
123 continue;
124 snprintf(netns_name, sizeof(netns_name), "%s/%s", etc_netns_path, entry->d_name);
125 snprintf(etc_name, sizeof(etc_name), "/etc/%s", entry->d_name);
126 if (mount(netns_name, etc_name, "none", MS_BIND, NULL) < 0) {
127 fprintf(stderr, "Bind %s -> %s failed: %s\n",
128 netns_name, etc_name, strerror(errno));
129 }
130 }
131 closedir(dir);
132}
133
134static int netns_exec(int argc, char **argv)
135{
136 /* Setup the proper environment for apps that are not netns
137 * aware, and execute a program in that environment.
138 */
139 const char *name, *cmd;
140 char net_path[MAXPATHLEN];
141 int netns;
142
143 if (argc < 1) {
144 fprintf(stderr, "No netns name specified\n");
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000145 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700146 }
147 if (argc < 2) {
Kees van Reeuwijk14645ec2013-02-08 03:32:36 +0000148 fprintf(stderr, "No command specified\n");
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000149 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700150 }
151 name = argv[0];
152 cmd = argv[1];
153 snprintf(net_path, sizeof(net_path), "%s/%s", NETNS_RUN_DIR, name);
Andrey Vaginbcb9d402013-06-04 12:01:14 +0400154 netns = open(net_path, O_RDONLY | O_CLOEXEC);
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700155 if (netns < 0) {
Kees van Reeuwijk14645ec2013-02-08 03:32:36 +0000156 fprintf(stderr, "Cannot open network namespace \"%s\": %s\n",
Eric W. Biederman4395d482013-01-17 14:46:43 +0000157 name, strerror(errno));
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000158 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700159 }
160 if (setns(netns, CLONE_NEWNET) < 0) {
Kees van Reeuwijk14645ec2013-02-08 03:32:36 +0000161 fprintf(stderr, "seting the network namespace \"%s\" failed: %s\n",
162 name, strerror(errno));
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000163 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700164 }
165
166 if (unshare(CLONE_NEWNS) < 0) {
167 fprintf(stderr, "unshare failed: %s\n", strerror(errno));
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000168 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700169 }
Eric W. Biederman144e6ce2013-01-17 14:45:33 +0000170 /* Don't let any mounts propogate back to the parent */
171 if (mount("", "/", "none", MS_SLAVE | MS_REC, NULL)) {
Kees van Reeuwijk14645ec2013-02-08 03:32:36 +0000172 fprintf(stderr, "\"mount --make-rslave /\" failed: %s\n",
Eric W. Biederman144e6ce2013-01-17 14:45:33 +0000173 strerror(errno));
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000174 return EXIT_FAILURE;
Eric W. Biederman144e6ce2013-01-17 14:45:33 +0000175 }
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700176 /* Mount a version of /sys that describes the network namespace */
177 if (umount2("/sys", MNT_DETACH) < 0) {
178 fprintf(stderr, "umount of /sys failed: %s\n", strerror(errno));
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000179 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700180 }
181 if (mount(name, "/sys", "sysfs", 0, NULL) < 0) {
182 fprintf(stderr, "mount of /sys failed: %s\n",strerror(errno));
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000183 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700184 }
185
186 /* Setup bind mounts for config files in /etc */
187 bind_etc(name);
188
JunweiZhang95592b42013-07-09 08:55:20 -0700189 fflush(stdout);
190
191 if (batch_file) {
192 int status;
193 pid_t pid;
194
195 pid = fork();
196 if (pid < 0) {
197 perror("fork");
198 return EXIT_FAILURE;
199 }
200
201 if (pid != 0) {
202 /* Parent */
203 if (waitpid(pid, &status, 0) < 0) {
204 perror("waitpid");
205 return EXIT_FAILURE;
206 }
207
208 if (WIFEXITED(status)) {
209 /* ip must returns the status of the child,
210 * but do_cmd() will add a minus to this,
211 * so let's add another one here to cancel it.
212 */
213 return -WEXITSTATUS(status);
214 }
215
216 return EXIT_FAILURE;
217 }
218 }
219
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700220 if (execvp(cmd, argv + 1) < 0)
Kees van Reeuwijk14645ec2013-02-08 03:32:36 +0000221 fprintf(stderr, "exec of \"%s\" failed: %s\n",
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700222 cmd, strerror(errno));
JunweiZhang95592b42013-07-09 08:55:20 -0700223 _exit(EXIT_FAILURE);
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700224}
225
Eric W. Biederman9a7b3d92013-01-17 14:48:15 +0000226static int is_pid(const char *str)
227{
228 int ch;
229 for (; (ch = *str); str++) {
230 if (!isdigit(ch))
231 return 0;
232 }
233 return 1;
234}
235
236static int netns_pids(int argc, char **argv)
237{
238 const char *name;
239 char net_path[MAXPATHLEN];
240 int netns;
241 struct stat netst;
242 DIR *dir;
243 struct dirent *entry;
244
245 if (argc < 1) {
246 fprintf(stderr, "No netns name specified\n");
247 return EXIT_FAILURE;
248 }
249 if (argc > 1) {
250 fprintf(stderr, "extra arguments specified\n");
251 return EXIT_FAILURE;
252 }
253
254 name = argv[0];
255 snprintf(net_path, sizeof(net_path), "%s/%s", NETNS_RUN_DIR, name);
256 netns = open(net_path, O_RDONLY);
257 if (netns < 0) {
258 fprintf(stderr, "Cannot open network namespace: %s\n",
259 strerror(errno));
260 return EXIT_FAILURE;
261 }
262 if (fstat(netns, &netst) < 0) {
263 fprintf(stderr, "Stat of netns failed: %s\n",
264 strerror(errno));
265 return EXIT_FAILURE;
266 }
267 dir = opendir("/proc/");
268 if (!dir) {
269 fprintf(stderr, "Open of /proc failed: %s\n",
270 strerror(errno));
271 return EXIT_FAILURE;
272 }
273 while((entry = readdir(dir))) {
274 char pid_net_path[MAXPATHLEN];
275 struct stat st;
276 if (!is_pid(entry->d_name))
277 continue;
278 snprintf(pid_net_path, sizeof(pid_net_path), "/proc/%s/ns/net",
279 entry->d_name);
280 if (stat(pid_net_path, &st) != 0)
281 continue;
282 if ((st.st_dev == netst.st_dev) &&
283 (st.st_ino == netst.st_ino)) {
284 printf("%s\n", entry->d_name);
285 }
286 }
287 closedir(dir);
288 return EXIT_SUCCESS;
289
290}
291
292static int netns_identify(int argc, char **argv)
293{
294 const char *pidstr;
295 char net_path[MAXPATHLEN];
296 int netns;
297 struct stat netst;
298 DIR *dir;
299 struct dirent *entry;
300
301 if (argc < 1) {
302 fprintf(stderr, "No pid specified\n");
303 return EXIT_FAILURE;
304 }
305 if (argc > 1) {
306 fprintf(stderr, "extra arguments specified\n");
307 return EXIT_FAILURE;
308 }
309 pidstr = argv[0];
310
311 if (!is_pid(pidstr)) {
312 fprintf(stderr, "Specified string '%s' is not a pid\n",
313 pidstr);
314 return EXIT_FAILURE;
315 }
316
317 snprintf(net_path, sizeof(net_path), "/proc/%s/ns/net", pidstr);
318 netns = open(net_path, O_RDONLY);
319 if (netns < 0) {
320 fprintf(stderr, "Cannot open network namespace: %s\n",
321 strerror(errno));
322 return EXIT_FAILURE;
323 }
324 if (fstat(netns, &netst) < 0) {
325 fprintf(stderr, "Stat of netns failed: %s\n",
326 strerror(errno));
327 return EXIT_FAILURE;
328 }
329 dir = opendir(NETNS_RUN_DIR);
330 if (!dir) {
331 /* Succeed treat a missing directory as an empty directory */
332 if (errno == ENOENT)
333 return EXIT_SUCCESS;
334
335 fprintf(stderr, "Failed to open directory %s:%s\n",
336 NETNS_RUN_DIR, strerror(errno));
337 return EXIT_FAILURE;
338 }
339
340 while((entry = readdir(dir))) {
341 char name_path[MAXPATHLEN];
342 struct stat st;
343
344 if (strcmp(entry->d_name, ".") == 0)
345 continue;
346 if (strcmp(entry->d_name, "..") == 0)
347 continue;
348
349 snprintf(name_path, sizeof(name_path), "%s/%s", NETNS_RUN_DIR,
350 entry->d_name);
351
352 if (stat(name_path, &st) != 0)
353 continue;
354
355 if ((st.st_dev == netst.st_dev) &&
356 (st.st_ino == netst.st_ino)) {
357 printf("%s\n", entry->d_name);
358 }
359 }
360 closedir(dir);
361 return EXIT_SUCCESS;
362
363}
364
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700365static int netns_delete(int argc, char **argv)
366{
367 const char *name;
368 char netns_path[MAXPATHLEN];
369
370 if (argc < 1) {
371 fprintf(stderr, "No netns name specified\n");
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000372 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700373 }
374
375 name = argv[0];
376 snprintf(netns_path, sizeof(netns_path), "%s/%s", NETNS_RUN_DIR, name);
377 umount2(netns_path, MNT_DETACH);
378 if (unlink(netns_path) < 0) {
Kees van Reeuwijk14645ec2013-02-08 03:32:36 +0000379 fprintf(stderr, "Cannot remove namespace file \"%s\": %s\n",
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700380 netns_path, strerror(errno));
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000381 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700382 }
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000383 return EXIT_SUCCESS;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700384}
385
386static int netns_add(int argc, char **argv)
387{
388 /* This function creates a new network namespace and
389 * a new mount namespace and bind them into a well known
390 * location in the filesystem based on the name provided.
391 *
392 * The mount namespace is created so that any necessary
393 * userspace tweaks like remounting /sys, or bind mounting
394 * a new /etc/resolv.conf can be shared between uers.
395 */
396 char netns_path[MAXPATHLEN];
397 const char *name;
Eric W. Biederman223f4d82011-07-15 14:29:41 +0000398 int fd;
Eric W. Biederman58a3e822013-01-17 14:47:18 +0000399 int made_netns_run_dir_mount = 0;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700400
401 if (argc < 1) {
402 fprintf(stderr, "No netns name specified\n");
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000403 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700404 }
405 name = argv[0];
406
407 snprintf(netns_path, sizeof(netns_path), "%s/%s", NETNS_RUN_DIR, name);
408
409 /* Create the base netns directory if it doesn't exist */
410 mkdir(NETNS_RUN_DIR, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
411
Eric W. Biederman58a3e822013-01-17 14:47:18 +0000412 /* Make it possible for network namespace mounts to propogate between
413 * mount namespaces. This makes it likely that a unmounting a network
414 * namespace file in one namespace will unmount the network namespace
415 * file in all namespaces allowing the network namespace to be freed
416 * sooner.
417 */
418 while (mount("", NETNS_RUN_DIR, "none", MS_SHARED | MS_REC, NULL)) {
419 /* Fail unless we need to make the mount point */
420 if (errno != EINVAL || made_netns_run_dir_mount) {
421 fprintf(stderr, "mount --make-shared %s failed: %s\n",
422 NETNS_RUN_DIR, strerror(errno));
423 return EXIT_FAILURE;
424 }
425
426 /* Upgrade NETNS_RUN_DIR to a mount point */
427 if (mount(NETNS_RUN_DIR, NETNS_RUN_DIR, "none", MS_BIND, NULL)) {
428 fprintf(stderr, "mount --bind %s %s failed: %s\n",
429 NETNS_RUN_DIR, NETNS_RUN_DIR, strerror(errno));
430 return EXIT_FAILURE;
431 }
432 made_netns_run_dir_mount = 1;
433 }
434
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700435 /* Create the filesystem state */
Eric W. Biederman223f4d82011-07-15 14:29:41 +0000436 fd = open(netns_path, O_RDONLY|O_CREAT|O_EXCL, 0);
437 if (fd < 0) {
Kees van Reeuwijk14645ec2013-02-08 03:32:36 +0000438 fprintf(stderr, "Cannot not create namespace file \"%s\": %s\n",
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700439 netns_path, strerror(errno));
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000440 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700441 }
Eric W. Biederman223f4d82011-07-15 14:29:41 +0000442 close(fd);
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700443 if (unshare(CLONE_NEWNET) < 0) {
Kees van Reeuwijk14645ec2013-02-08 03:32:36 +0000444 fprintf(stderr, "Failed to create a new network namespace \"%s\": %s\n",
445 name, strerror(errno));
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700446 goto out_delete;
447 }
448
449 /* Bind the netns last so I can watch for it */
450 if (mount("/proc/self/ns/net", netns_path, "none", MS_BIND, NULL) < 0) {
451 fprintf(stderr, "Bind /proc/self/ns/net -> %s failed: %s\n",
452 netns_path, strerror(errno));
453 goto out_delete;
454 }
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000455 return EXIT_SUCCESS;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700456out_delete:
457 netns_delete(argc, argv);
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000458 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700459}
460
461
462static int netns_monitor(int argc, char **argv)
463{
464 char buf[4096];
465 struct inotify_event *event;
466 int fd;
467 fd = inotify_init();
468 if (fd < 0) {
469 fprintf(stderr, "inotify_init failed: %s\n",
470 strerror(errno));
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000471 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700472 }
473 if (inotify_add_watch(fd, NETNS_RUN_DIR, IN_CREATE | IN_DELETE) < 0) {
474 fprintf(stderr, "inotify_add_watch failed: %s\n",
475 strerror(errno));
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000476 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700477 }
478 for(;;) {
479 ssize_t len = read(fd, buf, sizeof(buf));
480 if (len < 0) {
481 fprintf(stderr, "read failed: %s\n",
482 strerror(errno));
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000483 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700484 }
485 for (event = (struct inotify_event *)buf;
486 (char *)event < &buf[len];
487 event = (struct inotify_event *)((char *)event + sizeof(*event) + event->len)) {
488 if (event->mask & IN_CREATE)
489 printf("add %s\n", event->name);
490 if (event->mask & IN_DELETE)
491 printf("delete %s\n", event->name);
492 }
493 }
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000494 return EXIT_SUCCESS;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700495}
496
497int do_netns(int argc, char **argv)
498{
499 if (argc < 1)
500 return netns_list(0, NULL);
501
502 if ((matches(*argv, "list") == 0) || (matches(*argv, "show") == 0) ||
503 (matches(*argv, "lst") == 0))
504 return netns_list(argc-1, argv+1);
505
506 if (matches(*argv, "help") == 0)
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000507 return usage();
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700508
509 if (matches(*argv, "add") == 0)
510 return netns_add(argc-1, argv+1);
511
512 if (matches(*argv, "delete") == 0)
513 return netns_delete(argc-1, argv+1);
514
Eric W. Biederman9a7b3d92013-01-17 14:48:15 +0000515 if (matches(*argv, "identify") == 0)
516 return netns_identify(argc-1, argv+1);
517
518 if (matches(*argv, "pids") == 0)
519 return netns_pids(argc-1, argv+1);
520
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700521 if (matches(*argv, "exec") == 0)
522 return netns_exec(argc-1, argv+1);
523
524 if (matches(*argv, "monitor") == 0)
525 return netns_monitor(argc-1, argv+1);
526
527 fprintf(stderr, "Command \"%s\" is unknown, try \"ip netns help\".\n", *argv);
Eric W. Biederman8e2d47d2013-01-17 14:46:09 +0000528 return EXIT_FAILURE;
Eric W. Biederman0dc34c72011-07-13 09:48:26 -0700529}